Save document class properties to data fields on launch (FileNet Web Services and Open Client only)

NOTE  The information in this topic applies only to FileNet Web Services and Open Client systems. For Workplace, see Subscription property mapping.

When you define a link between a workflow definition and a document or document class, you can optionally choose to launch the workflow automatically when one of the following events occurs:

In addition, you can optionally copy a value from a property of the launching document into a corresponding workflow data field. For example, all document classes include an Author property, which holds the name of the user who added or checked in each version of a document belonging to that class. Upon automatic launch, you can copy the Author value into a workflow data field named Doc_Author and use it as a basis for subsequent routing of the workflow (perhaps distributing work among three work queues, one for user names starting with A - H, and so on.)

NOTE  This functionality is available only for links defined with automatic launching.

There are two ways to identify which document property to copy:

To save a document property value to a workflow data field

  1. In the workflow properties, define a data field named Doc_<property name> or DocID_<property_id>. The property name must exactly match the name of a property defined for a document class in Content Services. See the Content Services Help for Document Classes and CVLs for details on defining document class properties.

    See Workflow properties - data fields for information about defining data fields. Note that the data field:

  2. Specify the data field you defined above as a parameter for the Launch step. See Launch step - parameter properties or Specify field usage in steps for instructions.
  3. Define a link that specifies automatic launch between this workflow definition and the document class specified in step 1, or a document belonging to that class. See Help for Linking for details on defining links and specifying automatic launch.

DocClassInfo utility to display the property id of a document property

The DocClassInfo utility extracts a report of all the DocClasses in a specified library, and for each property defined in the class shows the property ID, display name, and data type. With this information, you can map the values of document properties into corresponding workflow data fields upon workflow launch.

For example, a custom document class can include a document property of type string that holds the customer number; the display name for this property can be CustomerNum. If the launch step of a workflow includes a string data field named DOC_CustomerNum, the value of the CustomerNum property is stored in the DOC_CustomerNum data field upon workflow launch.

Building on the above example, if the display name of the property includes a space (for example, Customer Num) the data field name syntax DOC_<display name> does not work. Instead, the data field name must follow this convention: DOCID_<property ID>. Assuming the ID of the Customer Num property is CustNumber, the corresponding data field should be named DOCID_CustNumber.

Use the DocClassInfo utility to get the document class property information you need to define corresponding workflow data fields. To run the utility, enter the following at the command line:

java -cp pw.jar FileNet.ve.idm.test.testtool.DocClassInfo /webApp=WEB_WORKFLO

/hostName=localhost (if running on the web server) or the web server name
/idmPort=1099 or port number that the IDM integration service is running on the web server
Optional parameters:
/name=CS account
/pw=password for CS account, if empty then just omit it
/group=the group to logon as
/library=the library id to query doc class info for

If the optional parameters are omitted, then the program will prompt for logon information for each library. The output will be displayed to the console. Following is sample output.

Logged on to gem^hq-emerald

-----------------------------------------------------------------------

DocClass name= General, id={B28663C1-C39C-11CF-B1FF-0020AF398F15}
Property Descriptions information: 5 properties.
[0]: id=idmName, display name=Title, type desc=String
[1]: id=idmId, display name=Item ID, type desc=String
[2]: id=idmVerFileName, display name=File Name, type desc=String
[3]: id=idmVerCreateDate, display name=Checkin Date, type desc=Date
[4]: id=idmVerCheckinUser, display name=Checked In By User, type desc=String

-----------------------------------------------------------------------

DocClass name= QuickDoc, id={B28663C1-C39C-11CF-B1FF-0020AF398F15}
Property Descriptions information: 3 properties.
[0]: id=idmName, display name=Title, type desc=String
[1]: id=idmVerCustom6, display name=QDocType, type desc=String
[2]: id=idmVerCustom7, display name=QFirstName, type desc=String

Workflow Links Information: 1 links.
[0]:WFLINK - id=1080, name=ONCHECKIN#3, event=onCheckin, for docclass:QuickDoc,
wflDocID=003670222:4, vwVersion=~~1     VWService0:hq-ruby:FileNet      1
136     6       1042768327, isolated region=1, expression