Process History
Introduction
This component is a lazy loading list that displays all business cases of a business entity in your application. You can include this component everywhere:
In a page
In a dialog
Note
If you use this component in Portal, redirect to case details page when clicking on a row.
How to Use
First, you have to link the cases to the business entity. Call the subprocess
SetBusinessEntityId
in each process which needs to be linked and input an
identifier unique to your business entity. The subprocess will set the id to the
additional property “CASE_BUSINESS_ENTITY_PROPERTY” of the business case.
Link the cases to the business entity.
Call the subprocess
SetCaseBusinessEntity
in the process which needs to be linked and input an identifier unique to your business entity. The subprocess will set the id to the additional property “CASE_BUSINESS_ENTITY_PROPERTY” of the business case.Include the process history component into your page:
<ic:com.axonivy.portal.components.ProcessHistory businessEntityId="alpha" />
The value of the attribute
businessEntityId
must match the id input into the subprocess in the first step.By default, the component will load 20 cases at a time. You can change this by setting the attribute
chunkSize
to the number you want. You should use this attribute alongside the attributescrollHeight
to configure the scroll bar of the list.Attributes of this component:
Name
Default
Type
Description
businessEntityId
String
The value of this attribute must match the id input into the subprocess in the first step.
chunkSize
20
Integer
Integer value to size of cases that will be loaded when scroll down.
scrollHeight
600
Integer
Integer value to configure the height of the list.
emptyMessage
There are no cases
String
The message will be displayed if there are no cases.
showCasesOfOwner
false
Boolean
Boolean value to specify the displaying cases of owner, when set to true cases of owner will be displayed.
dateTimePattern
dd.MM.yyyy HH:mm
String
Datetime pattern for
created
column.Note
If you use this component in a dialog, you have to run the script
processHistory.setup();
when the dialog is shown, e.g.:<p:dialog widgetVar="process-history-dialog" id="process-history-dialog" width="800" height="500" resizable="false" header="Process history of Beta Company" modal="true" onShow="processHistory.setup();"> <ic:com.axonivy.portal.components.ProcessHistory businessEntityId="beta" chunkSize="10" scrollHeight="400" /> </p:dialog>
Override the callable subprocess
OpenCaseDetailsHook
to handle navigation when clicking on a case in the Process History component.Please refer to the process
ProcessHistoryExample
inportal-components-examples
for more details on how to use the Process History.If you want to customize its style, please refer to Style Customization.
Important
If your process has a Trigger component or sends a signal to start another process with the option “Attach to Business Case that triggered this process” selected, the current case of the process will become a technical case and will not be loaded into the process history list. In this case, you need to call the SetCaseBusinessEntity subprocess after the first Trigger or signal sending step to be able query this case in the process history.
Migrate from Deprecated Process History
Replace code in HTML files: replace
ic:ch.ivy.addon.portal.component.ProcessHistory
withic:com.axonivy.portal.components.ProcessHistory
.Optional: set
showCaseOfOwner
totrue
if you want to show the cases owned by the login user.Optional: set
dateTimePattern
to a specific date/time pattern if you want to show the date/time in a unique format different from the default format (dd:MM.yyyy HH:mm).Optional: Override the subprocess
OpenCaseDetailsHook
to handle navigation when clicking on a case in the Process History component.For applications using the Portal without IFrame:
Copy the contents of the subprocess
OpenPortalCaseDetailsHook
inportal
to the overridden subprocessOpenCaseDetailsHook
.
For applications using the Portal with an IFrame:
Set attribute
isOpenInFrame
totrue
.Modify the subprocess
OpenCaseDetailsHook
to generatecaseDetailsUrl
. Process History component will navigate to this URL when the user clicks on a case.