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 .
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.
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?
Each tasks properties could be viewed via their method calls for view.
Create User task? all tasks are considered User Tasks.
You could update them via their update methods:
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.
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 ?
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)
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
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.
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.