06-11-2014 12:53 AM
Hi All,
We are trying to utilize the web services exposed by the CPO 3.0. However we are stuck with following topics/questions and not able to move forward. The intention of this, is basically to trigger/observe/stop/review activities from a custom portal similar to Cisco Prime catalog. We have referred NB Web Services guide, but it doesn't explain in detail
Any help would be much appreciated .
Thank you!
Regards,
Eswar
06-11-2014 06:04 AM
ok... I'll give it a whirl.
As a side note, you should be able to use something like SOAP UI if you are trying to easily form the calls. You can use SOAP UI and connect to whatever WSDL in the NBWS you want and it will give you all the methods and you can create sample calls and try them out. This is shown quite a bit in my blogs. For web service work, my blogs are a great place to start.
If you have more pointed use case and what exactly you are trying to do we can go into further detail maybe, but the above is a good start.
--Shaun
06-12-2014 07:29 AM
Thanks Shaun. It is helpful. With respect to tasks, need a clarity on the web service usage. For example, consider a process with 3 tasks
First Task- Get User inputs
Second Task - Approval task
Third Task -Create user Task
If I need to know the status of all the above three tasks and also update it via web service , how to do it? May be I'll put the query like this , how to check the status of approval task and approve it using web service?
Thanks!
Regards,
Eswar
06-12-2014 07:34 AM
Each tasks properties could be viewed via their method calls for view.
Method name:
ViewApprovalTaskProperties
etc
Create User task? all tasks are considered User Tasks.
You could update them via their update methods:
ie: UpdateApprovalTask
So you could check and approve via those methods I would imagine. Never done this before but I think quite doable.
Does your custom portal not have any built-in approval facilities? I know CPSC does.
Food for thought.
good luck!
--shaun
06-20-2014 06:27 AM
Shaun,
Thanks for your inputs. Yup, our custom portal doesn't support built-in approval facilities. Also cannot go with CPSC, at this point in time
With your inputs , I could understand using ViewApprovalTaskProperties() , we can view the properties and status . But how do I get the specific Instance ID of the task ? While designing the process, when a task is dragged and dropped, guess it is mapped with a GUID. Also when ever a process is triggered , each tasks present inside also gets an associated instance ID(Note: Am referring to Task Instance ID , not the Process Instance ID). How to get it, so that I can pass it to ViewApprovalTaskProperties() and get the status ?
Regards,
Eswar
06-20-2014 06:32 AM
If you create via the process itself using like "Create alert" or "create whatever" it exposes the GUID as the Task ID in the process. (see attached image)
If you are doing via create in the web services I would imagine the web service call returns the GUID. (it does for targets and processes)
06-24-2014 05:08 AM
Thanks Shaun. To understand better, are there any differences between Task ID and Activity Instance ID? Because I have noticed that , TaskID is getting created during the design of the process. But the activity Instance ID is assigned/generated for every trigger of the process. My doubt is, should we pass the TaskID or Activity Instance ID to view the properties of approval task? Find the attached snapshot for your reference
06-24-2014 05:16 AM
Task ID -> this is the GUID the refers to the USER TASK (alert/incident/etc) that you create. It is unique per user task
Activity Instance ID -> this refers to the activity CREATE ALERT or CREATE INCIDENT or whatever. This is referring to the activity itself and *NOT* the Task.
You should use the Task ID to refer or find the task you create in the system.
06-27-2014 07:19 AM
Thanks Shaun, but how to get the Task ID through web service call?. It is changing for every instance of process triggered
06-27-2014 12:22 PM
There is no call to get back a GUID of a task.
Depending on how your process is you could save it as an output variable of your process and then get that through the process instance WSDL. You could also publish it via SNMP trap or to the event log and have your application read that. You could also publish it to a flat file or output file and read from that.
What really matters is how your other application needs to consume it and then you'll have to write the interface around that.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide