Top
Top
LibraryEASYProcess Reference ManualProcessesServicesWorkflowWorkshopAddHistory

AddHistory Overview

AddHistory is used to create a workflow request history entry. This is useful if you want to track any actions, comments or time stamps at each status in the workflow.

AddHistory is usually called in a workflow status process, button process, or stand alone process. Once the service is called, a record will be created in the EP_Workflow_Request_History table. AddHistory won’t override or delete any existing record in the table. Since the Workflow Request Id is a required input of the service, a workflow request must be created before you call AddHistory.

Having a history of the workflow request can be useful for developers to see that status progression. Also, since the developer determines the messages that are written to the database, you can make user friendly messages that inform site users of statuses. You can then build a page or web part for request history and display any information needed.

If you have any question about EASYProcess workflow, please refer to the Workflow document for further explanation.


AddHistory Use Examples
Workshop:WorkflowWorkshop
Service:AddHistory
Inputs
WorkflowRequestIdRequired. This is the Id of the request that you want to write history to.

EntityIdRequired. This is the Id of the entity you want to create a request for.

EntityTypeRequired. This is the type of the entity that is associated to the workflow.

HistoryEntityIdRequired. Value is pre-populated once you use the service. You can leave as is or use the same value as EntityId.

HistoryEntityTypeRequired. Value is pre-populated once you use the service. You can leave as is or use the same value as EntityType.

HistoryTypeRequired. The type of this history entry. Defined by user.

CommentRequired. This is for any comments you want to use to describe this history entry, up to 500 characters.

CustomData1Optional. User reserved field.

CustomData2Optional. User reserved field.

CustomData3Optional. User reserved field.

CustomData4Optional. User reserved field.

CustomData5Optional. User reserved field.

CustomData6Optional. User reserved field.

CustomData7Optional. User reserved field.

CustomData8Optional. User reserved field.

CustomData9Optional. User reserved field.

CustomData10Optional. User reserved field.

AddHistory Use Examples

Basic AddHistory Use

In this example, we call AddHistory in the workflow CompleteStatus process. Since we use it in a workflow process, all required fields are pre-populated for you. The only thing you might want to change is the comment field. The default value comes from ExecuteWorkflow service, since it is inside a CompleteStatus process. If you use AddHistory in StatusArrival and StatusExit, you will need to specify the comment field.

In the log, it only shows the start time and end time of the service.

In EP_Workflow_Request_History table, you’ll see this history entry. CreatedBy, CreatedOn, UpdatedBy and UpdatedOn will be populated automatically with the UserId and current date time. You can then build a page or web part for request history and display any information you need.

If you call AddHistory in other process, you will need to enter all required fields to meet your audit design. Please note that all required fields cannot be blank, otherwise, you will not be able to the save the service. The following is a sample input calling from button process.

AddHistory with custom data

This is an example that we write a history record to the request in previous example with all custom data fields typed in.

In the EP_Workflow_Request_History table, you will see the history record is populated with all CustomData columns filled out.


Powered by EASYProcess (© 2019 K-Rise Systems, Inc).