This project has moved and is read-only. 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")))


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

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


No comments yet.