PerformActivity
From Business Process Management, BPM and Workflow Automation Wiki | BizAgi BPMS
<keywords content="keywords"> performActivity, performactivity, performActivityAsString, performactivityasstring, perform Activity, perform activity, SOA Layer, soa layer, WorkflowEngineSOA, workflowenginesoa, Workflow Engine SOA, workflow engine soa </keywords>
Contents |
performActivity
A method from the WorkflowEngineSOA web service used to execute an Activity from an external application, making possible for a case to proceed. This document also applies to the method performActivityAsString.
Description
This method makes a case in Bizagi to continue using an XML as input parameter, and at the same time it is possible to set business data for the activity being performed. The method performActivity receives and returns an XmlDocument while performActivityAsString receives and returns an XML in string format.
Input Data
Here is the schema of the expected XML (copy it from here):
Parameter 1 (XmlDocument or String Type)
BizAgiWSParam: Root node, containing all the necessary information to execute the Activity.
domain: Here goes the name of the domain for the Bizagi user who will be register as performer of the executed Activity.
userName: Name of the user who will be register as performer of the executed Activity.
ActivityData: Contains all the necessary information to find an activity.
idCase: Is the case identification number for the activity which wants to be performed. It is required to include this element or the radNumber.
radNumber: An alternative to the idCase. It is the creation number (case number) of the case containing the pending Activity that wants to be continued. When the same creation number is used for several cases (like when a subprocess uses its parent’s number) the idCase must be used to distinguish for which case the activity belongs to.
taskId: It is the identification number for the Activity which wants to be executed. This element is necessary; if this number is not known then the taskName must be included.
taskName: Use as a complement or alternative to taskId, it is the name of the pending Activity which wants to be executed.
Entities: It is a node containing the values for the business data that is going to be set for the case.
Example
With the following XML the user domain\Raulp will execute the Activity called Task3 of the case with creation number 9253. Also for this case, in this Activity, the attribute BuroScore will be set to have the value 27:
Output Data
The schema of the returned XML is this (copy it from here):
The response includes basic information of the case (and process) just continued. Here is the description of each data contained in the returned XML.
process: This element includes information for the process.
processId: Identification number of the case (idCase).
processRadNumber: Alphanumeric value corresponding to the creation number of the case.
savedMessage: Reserved for future use.
Entities: Reserved for future use.
processWorkflowClass: The information in this node is all about the process (process metadata) not about the particular case.
workflowClassId: Identification number (or key) of the process.
workflowClassName: Name of the process.
workflowClassDisplayName: Display name of the process.
workflowClassDescription: Process description.
workflowClassHelpText: Process help text.
workflowClassHelpURL: Help URL for the process.
workflowClassDisplayOrder: The order in which the process will be viewed in Bizagi Studio.
workflowClassCreationDate: Creation date of the process.
workflowClassGlobalForm: Identification number of the process’s global form (zero if it is not configured).
workflowClassAllocationPrinciple: Reserved for future use.
workflowClassProcessType: Process type.
workflowClassDisplay: Indicates whether the process is visible or not.
workflowClassUseParentRadicationNumber: Indicates if a case of this process uses its own creation number or the same number as the parent process (if it is a subprocess).
processError: If the process of performing the activity is not successful, this element will contain information or the error.
errorCode: Code of the error that occurred, otherwise it will be empty.
errorMessage: Message of the error that occurred, otherwise it will be empty.
Path: XPath of the element, in the request XML, generating the error. Visible when the error is caused by wrong data.
Attrib: Is the name of the attribute in Bizagi where the saved operation was attempted. Visible when the error is caused by wrong data.
Value: Is the value which caused the error. Visible when the error is caused by wrong data.
ErrorMessage: Message explaining why the error occurred. Visible when the error is caused by wrong data.
CurrentWorkItems: The set of activities available for the case.
workItem: This is a specific activity (an instance of a task) of the process that is active for the case.
workItemId: Identification number or key of the activity.
workItemState: State in which the activity is.
workItemEntryDate: Date and time when the case reached this activity.
workItemDuration: Is the estimated duration, in minutes, for this activity.
workItemEstimatedSolutionDate: Is the case’s estimated solution date.
Task: Contains information about task corresponding to the activity.
taskId: Identification number or key of the task.
taskName: Name of the task.
taskDisplayName: Display name of the task.
taskDescription: Task’s descriptive text.
taskHelpText: Task’s help text.
taskEstimatedDuration: Is the estimated duration, in minutes, for the task.
taskType: Type of task.
taskCost: The estimated cost of the task. This value, like the estimated dates, is configured and determined by the designer of the process.
taskPriority: Fulfillment priority of the task.
Example
Here is the XML in response to the one send as example:
Since this method is like clicking on the Next button in the user interface, under the element CurrentWorkItems is found the information of the activity where the case gets after the activity named Task3 of the case 9253 is executed, that is Task2.
Related Articles
- View a guided example on how to Perform an Activity Using SOA
- View the setEvent web method definition to perform (set) an event instead.
- Go to SOA Layer.
<comments />