pp108 : GetActivityInstance

GetActivityInstance

This Web service operation returns the data pertaining to an activity for a Case instance. It contains information such as the planned date, the current status of the activity, and so on. GetActivityInstance is a part of the Method Set Case Instance Execution 4.2 Web service interface with the namespace 'http://schemas.cordys.com/casemanagement/execution/1.0'.

SOAP Request

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Body>
        <GetActivityInstance xmlns="http://schemas.cordys.com/casemanagement/execution/1.0">
            <caseinstanceid>002481F0-8E9F-11E2-FA99-875C6E6E3D97</caseinstanceid>
            <activityinstanceid>002481F0-8E9F-11E2-FA99-875C6E6E9D97</activityinstanceid>
        </GetActivityInstance>
    </SOAP:Body>
</SOAP:Envelope>
Request Parameters

Parameter

Description

Mandatory

Accepted Input Values

caseinstanceid

Unique identifier of the Case instance. The Case instance ID can be obtained from any of the following:

Yes

activityinstanceid

Unique identifier of the activity instance. The activity instance ID can be obtained from the Workflow.getTaskInstanceId() API.

Yes

SOAP Response

<data>
	<GetActivityInstanceResponse xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/casemanagement/execution/1.0">
    <tuple>
      <old>
        <ACTIVITY_INSTANCE>
          <CASE_STATE>
            <STATE_NAME>Default State</STATE_NAME>
          </CASE_STATE>
          <CASE_ACTIVITY>
            <ACTIVITY_NAME>subprocess</ACTIVITY_NAME>
            <ACTIVITY_TYPE>BPMTASK</ACTIVITY_TYPE>
            <ACTIVITY_MODEL_ID>00215A63-1B7C-11E2-F939-EC97D587DF7A</ACTIVITY_MODEL_ID>
          </CASE_ACTIVITY>
          <ACTIVITY_INSTANCE_ID>002481F0-8E9F-11E2-FA99-875C6E6E9D97</ACTIVITY_INSTANCE_ID>
          <CASE_INSTANCE>002481F0-8E9F-11E2-FA99-875C6E6E3D97</CASE_INSTANCE>
          <ACTIVITY>002481F0-8E9F-11E2-FA99-875C6E6DDD97</ACTIVITY>
          <PLANNED_ON>1371198444488</PLANNED_ON>
          <STARTED_ON>1371198444488</STARTED_ON>
          <LASTMODIFIED_ON>1371198444675</LASTMODIFIED_ON>
          <LASTMODIFIED_BY>cn=JDoe,cn=organizational users,o=system,cn=cordys,cn=build719,o=vanenburg.com</LASTMODIFIED_BY>
          <CORRELATION_ID>002481F0-8E9F-11E2-FA99-875C6E6EBD97</CORELATION_ID>
          <CURRENT_STATUS>RELEASED</CURRENT_STATUS>
        </ACTIVITY_INSTANCE>
      </old>
    </tuple>
  </GetActivityInstanceResponse>
</data>
	
Response Parameters

Parameter

Description

ACTIVITY_INSTANCE_ID

Unique identifier of the activity instance

CASE_INSTANCE

Unique identifier of the Case instance

ACTIVITY

Unique identifier of the activity

PLANNED_ON

Timestamp when the activity was planned

STARTED_ON

Timestamp when the activity has started

LASTMODIFIED_ON

Timestamp when the activity was last modified

LASTMODIFIED_BY

Last user who modified the activity

CORRELATION_ID

CORRELATION_ID and ACTIVITY_INSTANCE_ID are the same except in the scenario where users modeled a Case model in such a way that they can set their own generated GUID as the instance_id to instantiate a subprocess or subcase model.

CURRENT_STATUS

Current status of the activity. It contains one of the following values :

  • COMPLETED
  • RELEASED
  • PLANNED
  • OBSOLETE
  • ABORTED

STATE_NAME

Name of the state to which the activity belongs

ACTIVITY_NAME

Name of the Case activity

ACTIVITY_TYPE

Type of the Case activity. It contains one of the following values:

  • HUMANTASK - if the activity is a user interface
  • BPMTASK - if the activity is a BPM
  • CASETASK - if the activity is a Case Model