Skip to content

Commit 07d4617

Browse files
Add due dates and claim time and claimed by to case and process instances (#4202)
* First batch of changes * Update case instance and process instance due date and claim logic * Add claim and unclaim to case and process instance REST endpoints
1 parent c219a3b commit 07d4617

155 files changed

Lines changed: 3101 additions & 87 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.db2.create.app.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ CREATE INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_);
1515
CREATE UNIQUE INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
1616

1717
insert into ACT_GE_PROPERTY
18-
values ('app.schema.version', '8.1.0.0', 1);
18+
values ('app.schema.version', '8.1.0.1', 1);

modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.h2.create.app.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ CREATE INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_);
1515
CREATE UNIQUE INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
1616

1717
insert into ACT_GE_PROPERTY
18-
values ('app.schema.version', '8.1.0.0', 1);
18+
values ('app.schema.version', '8.1.0.1', 1);

modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.mssql.create.app.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ CREATE NONCLUSTERED INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_)
1515
CREATE UNIQUE NONCLUSTERED INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
1616

1717
insert into ACT_GE_PROPERTY
18-
values ('app.schema.version', '8.1.0.0', 1);
18+
values ('app.schema.version', '8.1.0.1', 1);

modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.mysql.create.app.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ ALTER TABLE ACT_APP_DEPLOYMENT MODIFY DEPLOY_TIME_ datetime(3);
1717
CREATE UNIQUE INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
1818

1919
insert into ACT_GE_PROPERTY
20-
values ('app.schema.version', '8.1.0.0', 1);
20+
values ('app.schema.version', '8.1.0.1', 1);

modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.oracle.create.app.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ CREATE INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_);
1515
CREATE UNIQUE INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
1616

1717
insert into ACT_GE_PROPERTY
18-
values ('app.schema.version', '8.1.0.0', 1);
18+
values ('app.schema.version', '8.1.0.1', 1);

modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.postgres.create.app.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ CREATE INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_);
1515
CREATE UNIQUE INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
1616

1717
insert into ACT_GE_PROPERTY
18-
values ('app.schema.version', '8.1.0.0', 1);
18+
values ('app.schema.version', '8.1.0.1', 1);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
update ACT_GE_PROPERTY set VALUE_ = '8.1.0.1' where NAME_ = 'app.schema.version';

modules/flowable-cmmn-api/src/main/java/org/flowable/cmmn/api/CmmnRuntimeService.java

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313
package org.flowable.cmmn.api;
1414

1515
import java.util.Collection;
16+
import java.util.Date;
1617
import java.util.List;
1718
import java.util.Map;
1819

1920
import org.flowable.cmmn.api.runtime.CaseInstanceBuilder;
21+
import org.flowable.cmmn.api.runtime.CaseInstanceUpdateBuilder;
2022
import org.flowable.cmmn.api.runtime.CaseInstanceQuery;
2123
import org.flowable.cmmn.api.runtime.CaseInstanceStartEventSubscriptionBuilder;
2224
import org.flowable.cmmn.api.runtime.CaseInstanceStartEventSubscriptionDeletionBuilder;
@@ -50,6 +52,14 @@ public interface CmmnRuntimeService {
5052

5153
CaseInstanceBuilder createCaseInstanceBuilder();
5254

55+
/**
56+
* Create a {@link CaseInstanceUpdateBuilder}, that allows to update various properties of a case instance.
57+
*
58+
* @param caseInstanceId
59+
* id of the case instance to update, cannot be null
60+
*/
61+
CaseInstanceUpdateBuilder createCaseInstanceUpdateBuilder(String caseInstanceId);
62+
5363
PlanItemInstanceTransitionBuilder createPlanItemInstanceTransitionBuilder(String planItemInstanceId);
5464

5565
void triggerPlanItemInstance(String planItemInstanceId);
@@ -421,6 +431,35 @@ public interface CmmnRuntimeService {
421431
*/
422432
void updateBusinessStatus(String caseInstanceId, String businessStatus);
423433

434+
/**
435+
* Sets the due date for the provided case instance.
436+
*
437+
* @param caseInstanceId
438+
* id of the case instance to set the due date, cannot be null
439+
* @param dueDate
440+
* new due date value
441+
*/
442+
void setCaseInstanceDueDate(String caseInstanceId, Date dueDate);
443+
444+
/**
445+
* Claims the case instance by setting the given user as the assignee.
446+
* When the case instance is already claimed by another user, an exception is thrown.
447+
*
448+
* @param caseInstanceId
449+
* id of the case instance to claim, cannot be null
450+
* @param userId
451+
* user id of the user to claim the case instance
452+
*/
453+
void claimCaseInstance(String caseInstanceId, String userId);
454+
455+
/**
456+
* Unclaims the case instance by removing the assignee.
457+
*
458+
* @param caseInstanceId
459+
* id of the case instance to unclaim, cannot be null
460+
*/
461+
void unclaimCaseInstance(String caseInstanceId);
462+
424463
/**
425464
* Adds an event-listener which will be notified of ALL events by the dispatcher.
426465
*

modules/flowable-cmmn-api/src/main/java/org/flowable/cmmn/api/history/HistoricCaseInstance.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public interface HistoricCaseInstance {
4040
String getCallbackType();
4141
String getReferenceId();
4242
String getReferenceType();
43+
Date getDueDate();
44+
Date getClaimTime();
45+
String getClaimedBy();
4346
String getTenantId();
4447
String getEndUserId();
4548

modules/flowable-cmmn-api/src/main/java/org/flowable/cmmn/api/runtime/CaseInstance.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public interface CaseInstance {
4040
String getReferenceId();
4141
String getReferenceType();
4242
boolean isCompletable();
43+
Date getDueDate();
44+
Date getClaimTime();
45+
String getClaimedBy();
4346
String getTenantId();
4447

4548
/**

0 commit comments

Comments
 (0)