This project has moved. For the latest updates, please go here.

Get Controlled Item

Gets the item being controlled by a workflow process using the ID of the activity.

Method Code

Dim inn As Innovator = Me.getInnovator
'Get the data from the workflow relationship about the controlled item
Dim itemInfo As Item = inn.applyAML(String.Format("<AML> <Item type=""Workflow"" action=""get"" select=""source_type,source_id""> <related_id> <Item type=""Workflow Process"" action=""get""> <Relationships> <Item type=""Workflow Process Activity"" action=""get""> <related_id>{0}</related_id> </Item> </Relationships> </Item> </related_id> </Item> </AML>", Me.getID))

If itemInfo.isError Then Return itemInfo
If itemInfo.getItemCount <> 1 Then Return inn.newError("More than one Workflow item found.")

Return inn.applyAML(String.Format("<AML> <Item typeId=""{0}"" id=""{1}"" action=""get"" /> </AML>", itemInfo.getProperty("source_type"), itemInfo.getProperty("source_id")))

Example

<AML>
  <Item type="Activity" id="816A5C1794C147A48AF210A80F2E61AC" action="Get Controlled Item" />
</AML>

Last edited Mar 5, 2012 at 3:00 PM by erdomke, version 2

Comments

No comments yet.