Article Details
Id: | 10121 |
Product: | finPOWER Connect |
Type: | NEW |
Version: | 1.05.07 |
Opened: | 07/06/2012 |
Closed: | 07/06/2012 |
Released: | 15/06/2012 |
Job: | J009773 |
Workflows; Publishing a Document now allows access to Workflow Item details
When a Document is created from a Workflow item, if the Document is an Email or SMS, a 'GenerateMessage' event is called in the Document's Script. This event now has two additional entries in the EventArge Key/Value List:
- Workflow - the finWorkflow object
- WorkflowItem - the finWorkflowItem object
These objects can be used from the 'GenerateMessage' Document Script event as follows:
Select Case eventId
Case "GenerateMessage"
Dim Workflow As finWorkflow
Dim WorkflowItem As finWorkflowItem
Workflow = DirectCast(eventArgs.GetObject("Workflow"), finWorkflow)
WorkflowItem = DirectCast(eventArgs.GetObject("WorkflowItem"), finWorkflowItem)
returnValues.SetString("message", String.Format("Generated from Workflow '{0}', item {1}.", Workflow.WorkflowId, WorkflowItem.Pk))
End Select
NOTE: These objects will only exist if the Document is being generated from a Workflow Item.