X4 Help Center
7.5 7.4 German English
Auto Light Dark
Auto Light Dark
7.5 7.4 German English

Case Management Statistics

This adapter provides statistics for cases (Business Process) and human tasks.

Properties

Operation

Operation executed by the adapter

Possible values:

  • GetAllCaseMetadata: Provide all cases metadata which corresponds to the specified filter criterion

  • GetAllTaskMetadata: Provide all task metadata which corresponds to the specified filter criterion

Parameters

Adapter

Main adapter class (do not change!)

Possible values: de.softproject.x4.server.bpm.casemanagement.adapter.CaseManagementStatisticsAdapter Main class (default)

Status values

1

The operation was executed successfully.

-1

The operation failed due to a technical error.

Input

The adapter expects a specific XML document as input depending on the selected operation.  

XML
<?xml version="1.0" encoding="UTF-8"?>
<CaseMetadataFilter>
	<!-- Filters all cases for the specified start date -->
	<From>2019-10-01T08:00:00.000</From>
	<!-- Filters all cases for the specified end date. -->
	<To>2019-10-07T08:00:00.000</To>
	<!-- Filters all cases for the specified process name -->
    <ProcessName>Invoice/Processes/InvoiceApproval.bpm</ProcessName>
	<!-- Filters all cases for the specified case state -->
	<CaseState>Approved</CaseState>
	<!-- Filters all cases for the specified technical state
		possible values: RUNNING, CRASHED, WAITING, FINISHED, FAILED, UNKNOWN -->
	<TechnicalState>FINISHED</TechnicalState> 
</CaseMetadataFilter>


XML
<?xml version="1.0" encoding="UTF-8"?>
<TaskMetadataFilter>
	<!-- Filters all human tasks for the specified start date. -->
	<From>2019-10-01T08:00:00.000</From>
	<!-- Filters all human tasks for the specified end date. -->
	<To>2019-10-07T08:00:00.000</To>
	<!-- Filters all cases for the specified process name -->
    <ProcessName>Invoice/Processes/InvoiceApproval.bpm</ProcessName>
	<!-- Filters all human tasks for the specified task state
	possible values: OPEN, CLOSED, IN_PROGRESS, DEADLINE_REACHED -->
	<TaskState>OPEN</TaskState>
	<!-- Filters all human tasks for the specified case state -->
	<CaseState>To be approved by clerk</CaseState>
	<!-- Filters all human tasks for the specified deadline -->
	<Deadline>2019-10-07T08:00:00.000</Deadline>
	<!-- Filters all human tasks for the specified assigned user or group (technical identifier must be specified) -->
	<Assignment type="GROUP">clerks</Assignment>
	<!-- Filters all human tasks for the specified owner -->
	<Owner>emil</Owner>
</TaskMetadataFilter> 


Note that when filtering for groups, i.e. Assignment of the type GROUP, the technical identifier and not the group name must be specified.

Output

The adapter outputs a specific XML document depending on the selected operation.  

XML
<?xml version="1.0" encoding="UTF-8"?>
<CaseManagementStatistics>
    <CaseMetadata caseId="86757d17-5a8c-47c8-84b1-3fc9f241bf9f">
        <CaseState>Approved</CaseState>
        <ProcessName>/Invoice/Processes/InvoiceApproval.bpm</ProcessName>
		<StartDate>2019-10-02T09:27:47.432+02:00</StartDate>
        <EndDate>2019-10-02T09:27:47.695+02:00</EndDate>
        <Duration>263</Duration>
        <TechnicalState>FINISHED</TechnicalState>
		<ProcessInstanceId>18644c02-42dc-47a8-8f7f-5c70de823d54</ProcessInstanceId>
    </CaseMetadata>
	<CaseMetadata caseId="a4f12abd-97ad-48cb-a969-40ad84e53ecd">
        <CaseState>Approved</CaseState>
        <ProcessName>/Invoice/Processes/InvoiceApproval.bpm</ProcessName>
		<StartDate>2019-10-04T14:27:47.146+02:00</StartDate>
        <EndDate>2019-10-07T14:27:47.842+02:00</EndDate>
        <Duration>696</Duration>
        <TechnicalState>FINISHED</TechnicalState>
		<ProcessInstanceId>18644c02-43dc-47a8-8f7f-5c70de823d54</ProcessInstanceId>
    </CaseMetadata>
	...
</CaseManagementStatistics>


XML
<?xml version="1.0" encoding="UTF-8"?>
<CaseManagementStatistics>
    <TaskMetadata taskId="fa24c1d0-e9f0-4a72-bca0-760c1cb1d653">
		<CaseReference>846fac61-ff14-b349-6452-12afb6487ac5</CaseReference>
		<HumanTaskReference>aeee7252-fcc2-4da8-b958-6e16dbaecadf</HumanTaskReference>
		<Title>Upload protocol</Title>
        <ProcessName>/Invoice/Processes/InvoiceApproval.bpm</ProcessName>
		<TaskState>OPEN</TaskState>
        <CaseState>To be approved by clerk</CaseState>
		<Deadline>2019-10-05T16:00:00.000+02:00</Deadline>
        <Assignment type="GROUP">clerks</Assignment>
        <Owner>emil</Owner>
        <StartDate>2019-10-01T08:14:41.395+02:00</StartDate>
		<EndDate>2019-10-02T10:48:12.753+02:00</EndDate>
    </TaskMetadata>
	<TaskMetadata taskId="9b330bc3-310a-4638-ac1b-07f115d564d7">
		<CaseReference>946ac5f6-64a8-3649-accf-69acf5a96fc5</CaseReference>
		<HumanTaskReference>5f377252-faa8-12fa-b958-6e16dbaecadf</HumanTaskReference>
		<Title>Release invoice</Title>
        <ProcessName>/Invoice/Processes/InvoiceApproval.bpm</ProcessName>
		<TaskState>OPEN</TaskState>
        <CaseState>To be approved by clerk</CaseState>
		<Deadline>2019-10-06T16:00:00.000+02:00</Deadline>
        <Assignment type="USER">clerks</Assignment>
        <Owner>emil</Owner>
        <StartDate>2019-10-01T13:27:53.593+02:00</StartDate>
		<EndDate>2019-10-04T11:56:09.852+02:00</EndDate>
    </TaskMetadata>
	...
</CaseManagementStatistics>