Example code - EnterWorks_Process_Exchange_(EPX) - 10.6

EnterWorks EPX Programmers Reference

Product type
Software
Portfolio
Verify
Product family
EnterWorks
Product
Precisely EnterWorks > EnterWorks Process Exchange (EPX)
Version
10.6
Language
English
Product name
Precisely EnterWorks
Title
EnterWorks EPX Programmers Reference
Topic type
Programming Reference
Reference
First publish date
2007

This example code shows the method within the WorkItemExample that takes a starting point activity object as a parameter and will create a work item for this process flow starting point. The code checks to determine if the work item name is editable for the starting point and constructs a date-time stamped name for the work item.

public void createAndSendWorkItem(ActivityVO startingActivity)

throws WorkItemException

{

Date now = new Date();

String useWorkItemName = null;

// starting point activities can be defined such

// that the default work item name

// cannot be overridden so check for that here

if (activity.getWorkitemNameEditableInd().intValue() == 1)

{

if ( workItemName_ == null )

useWorkItemName = activity.getName()

+ " - " + now.toLocaleString();

}

else

useWorkItemName = workItemName_;

}

else

{

// otherwise use the default work item name

useWorkItemName =

startingActivity.getWorkitemNameDefault();

}

String vargs[] = { useWorkItemName };

System.out.println ( getMessage("workitem.create",vargs) );

// System.out.println ( "create:" + useWorkItemName );

// create the work item

WorkItemVersionExtendedVO version =

workItemFacade_.create WorkItem(

this.getSessionProfile(),activity,useWorkItemName, null);

...

}