clsLogHistoryItem Step

Use this step to log custom information to User, Process Definition/Instances, Form Definition/Instances

Last published at: June 10th, 2024

Description:

During workflow execution, custom messages are added to items' history types, such as User, Process Definition or Process Instance, Forms Definition or Forms Instance.

 

Inputs

  • itemType – select Item Type (like User, Process Definition or Instance, Forms Definition or Instance)
  • message – History message as text
  • itemID – Definition ID of the above Item Type (advanced)
 

 

Returns

  • True – step executed successfully 
  • False - step failed to execute 
 

 

Usage:

 

 

Example:

Let’s build and execute the addMessageToHistoryDef example:

  • Create a new definition called “addMessageToHistoryDef
  • Select the definition and click the “design” button
  • Drag the AddMessageToHistory step to the canvas
  • Connect the dots between the start and AddMessageToHistory steps  
  • Click on the “AddMessageToUser” step to configure its “Settings” properties, as shown in the graphic below

 

  • In the Advanced tab, the ItemID (optional) is the user's process ID, available in the Administration - User Management - for the specific user. Otherwise, the message is added to the user's history to indicate who initiated the process instance.

 

  • Click on the “AddMessageToProcessDefinition” step to configure its “Settings” properties. 

 

  • In the Advanced tab, the ItemID (optional) is the Process Definition ID available in the table column on the Process Definition page. Otherwise, the message is added to the history of the current process definition. 

 

  • Click on the “AddMessageToProcessInstance” step to configure its properties. 

 

  • In the Advanced tab, the ItemID (optional) is the Process Instance ID, which is available in the table column on the Process Instance page. Otherwise, the message is added to the current process instance history.  

 

  • Save the "addMessageToHistoryDef" process definition, create a process instance, and execute. This step should add custom messages to items' history types, such as User, Process Definition or Process Instance, Forms Definition or Forms Instance. 
  • Navigate to User Management - Search on the User - Click on View History to view the comments

 

  • The history information is rendered on the new page as below.