diff --git a/components/api/api-modules-javascript/src/main/resources/META-INF/dirigible/modules/src/bpm/process.ts b/components/api/api-modules-javascript/src/main/resources/META-INF/dirigible/modules/src/bpm/process.ts index d8bfb6585f..35c4e1ddd4 100644 --- a/components/api/api-modules-javascript/src/main/resources/META-INF/dirigible/modules/src/bpm/process.ts +++ b/components/api/api-modules-javascript/src/main/resources/META-INF/dirigible/modules/src/bpm/process.ts @@ -38,8 +38,7 @@ export class Process { } public static getExecutionContext() { - const data = JSON.parse(__context.get('execution')); - return new ExecutionContext(data); + return new ExecutionContext(); } } @@ -48,208 +47,555 @@ export class Process { */ class ExecutionContext { - private data: any; + private execution: any; - constructor(data: any) { - this.data = data; + constructor() { + this.execution = __context.get('execution'); } + /** + * Unique id of this path of execution that can be used as a handle to provide external signals back into the engine after wait states. + */ public getId(): string { - return this.data.id; + return this.execution.getId(); } - public getRevision(): number { - return this.data.revision; + /** Reference to the overall process instance */ + public getProcessInstanceId(): string { + return this.execution.getProcessInstanceId(); } - public isInserted(): boolean { - return this.data.isInserted; + /** + * The 'root' process instance. When using call activity for example, the processInstance set will not always be the root. This method returns the topmost process instance. + */ + public getRootProcessInstanceId(): string { + return this.execution.getRootProcessInstanceId(); } - public isUpdated(): boolean { - return this.data.isUpdated; + /** + * Will contain the event name in case this execution is passed in for an {@link ExecutionListener}. + */ + public getEventName(): string { + return this.execution.getEventName(); } - public isDeleted(): boolean { - return this.data.isDeleted; + /** + * Sets the current event (typically when execution an {@link ExecutionListener}). + */ + public setEventName(eventName: string): void { + this.execution.setEventName(eventName); } - public getTenantId(): string | undefined { - return this.data.tenantId ?? undefined; + /** + * The business key for the process instance this execution is associated with. + */ + public getProcessInstanceBusinessKey(): string { + return this.execution.getProcessInstanceBusinessKey(); } - public getName(): string | undefined { - return this.data.name ?? undefined; + /** + * The business status for the process instance this execution is associated with. + */ + public getProcessInstanceBusinessStatus(): string { + return this.execution.getProcessInstanceBusinessStatus(); } - public getDescription(): string | undefined { - return this.data.description ?? undefined; + /** + * The process definition key for the process instance this execution is associated with. + */ + public getProcessDefinitionId(): string { + return this.execution.getProcessDefinitionId(); } - public getLocalizedName(): string | undefined { - return this.data.localizedName ?? undefined; + /** + * If this execution runs in the context of a case and stage, this method returns it's closest parent stage instance id (the stage plan item instance id to be + * precise). + * + * @return the stage instance id this execution belongs to or null, if this execution is not part of a case at all or is not a child element of a stage + */ + public getPropagatedStageInstanceId(): string { + return this.execution.getPropagatedStageInstanceId(); } - public getLocalizedDescription(): string | undefined { - return this.data.localizedDescription ?? undefined; + /** + * Gets the id of the parent of this execution. If null, the execution represents a process-instance. + */ + public getParentId(): string { + return this.execution.getParentId(); } - public getLockTime(): Date | undefined { - return this.data.lockTime ?? undefined; + /** + * Gets the id of the calling execution. If not null, the execution is part of a subprocess. + */ + public getSuperExecutionId(): string { + return this.execution.getSuperExecutionId(); } - public isActive(): boolean { - return this.data.isActive; - } - - public isScope(): boolean { - return this.data.isScope; - } - - public isConcurrent(): boolean { - return this.data.isConcurrent; - } - - public isEnded(): boolean { - return this.data.isEnded; - } - - public isEventScope(): boolean { - return this.data.isEventScope; - } - - public isMultiInstanceRoot(): boolean { - return this.data.isMultiInstanceRoot; - } - - public isCountEnabled(): boolean { - return this.data.isCountEnabled; + /** + * Gets the id of the current activity. + */ + public getCurrentActivityId(): string { + return this.execution.getCurrentActivityId(); } - public getEventName(): string | undefined { - return this.data.eventName ?? undefined; + /** + * Returns the tenant id, if any is set before on the process definition or process instance. + */ + public getTenantId(): string { + return this.execution.getTenantId(); } - public getDeleteReason(): string | undefined { - return this.data.deleteReason ?? undefined; + /** + * The BPMN element where the execution currently is at. + */ + public getCurrentFlowElement(): any { + return this.execution.getCurrentFlowElement(); } - public getSuspensionState(): number { - return this.data.suspensionState; + /** + * Change the current BPMN element the execution is at. + */ + public setCurrentFlowElement(flowElement: any): void { + this.execution.setCurrentFlowElement(flowElement); } - public getStartActivityId(): string | undefined { - return this.data.startActivityId ?? undefined; + /** + * Returns the {@link FlowableListener} instance matching an {@link ExecutionListener} if currently an execution listener is being execution. Returns null otherwise. + */ + public getCurrentFlowableListener(): any { + return this.execution.getCurrentFlowableListener(); } - public getStartUserId(): string | undefined { - return this.data.startUserId ?? undefined; + /** + * Called when an {@link ExecutionListener} is being executed. + */ + public setCurrentFlowableListener(currentListener: any): void { + this.execution.setCurrentFlowableListener(currentListener); } - public getStartTime(): Date | undefined { - return this.data.startTime ?? undefined; + /** + * Create a snapshot read only delegate execution of this delegate execution. + * + * @return a {@link ReadOnlyDelegateExecution} + */ + public snapshotReadOnly(): any { + return this.execution.snapshotReadOnly(); } - public getEventSubscriptionCount(): number { - return this.data.eventSubscriptionCount; + /** + * returns the parent of this execution, or null if there no parent. + */ + public getParent(): any { + return this.execution.getParent(); } - public getTaskCount(): number { - return this.data.taskCount; + /** + * returns the list of execution of which this execution the parent of. + */ + public getExecutions(): any[] { + return this.execution.getExecutions(); } - public getJobCount(): number { - return this.data.jobCount; + /** + * makes this execution active or inactive. + */ + public setActive(isActive: boolean): void { + this.execution.setActive(isActive); } - public getTimerJobCount(): number { - return this.data.timerJobCount; - } - - public getSuspendedJobCount(): number { - return this.data.suspendedJobCount; - } - - public getDeadLetterJobCount(): number { - return this.data.deadLetterJobCount; - } - - public getVariableCount(): number { - return this.data.variableCount; - } - - public getIdentityLinkCount(): number { - return this.data.identityLinkCount; - } - - public getProcessDefinitionId(): string | undefined { - return this.data.processDefinitionId ?? undefined; - } - - public getProcessDefinitionKey(): string | undefined { - return this.data.processDefinitionKey ?? undefined; - } - - public getProcessDefinitionName(): string | undefined { - return this.data.processDefinitionName ?? undefined; - } - - public getProcessDefinitionVersion(): number | undefined { - return this.data.processDefinitionVersion ?? undefined; - } - - public getDeploymentId(): string | undefined { - return this.data.deploymentId ?? undefined; - } - - public getActivityId(): string | undefined { - return this.data.activityId ?? undefined; + /** + * returns whether this execution is currently active. + */ + public isActive(): boolean { + return this.execution.isActive(); } - public getActivityName(): string | undefined { - return this.data.activityName ?? undefined; + /** + * returns whether this execution has ended or not. + */ + public isEnded(): boolean { + return this.execution.isEnded(); } - public getProcessInstanceId(): string | undefined { - return this.data.processInstanceId ?? undefined; + /** + * changes the concurrent indicator on this execution. + */ + public setConcurrent(isConcurrent: boolean): void { + this.execution.setConcurrent(isConcurrent); } - public getBusinessKey(): string | undefined { - return this.data.businessKey ?? undefined; + /** + * returns whether this execution is concurrent or not. + */ + public isConcurrent(): boolean { + return this.execution.isConcurrent(); } - public getParentId(): string | undefined { - return this.data.parentId ?? undefined; + /** + * returns whether this execution is a process instance or not. + */ + public isProcessInstanceType(): boolean { + return this.execution.isProcessInstanceType(); } - public getSuperExecutionId(): string | undefined { - return this.data.superExecutionId ?? undefined; + /** + * Inactivates this execution. This is useful for example in a join: the execution still exists, but it is not longer active. + */ + public inactivate(): void { + this.execution.inactivate(); } - public getRootProcessInstanceId(): string | undefined { - return this.data.rootProcessInstanceId ?? undefined; + /** + * Returns whether this execution is a scope. + */ + public isScope(): boolean { + return this.execution.isScope(); } - public isForcedUpdate(): boolean { - return this.data.forcedUpdate; + /** + * Changes whether this execution is a scope or not. + */ + public setScope(isScope: boolean): void { + this.execution.setScope(isScope); } - public getCallbackId(): string | undefined { - return this.data.callbackId ?? undefined; + /** + * Returns whether this execution is the root of a multi instance execution. + */ + public isMultiInstanceRoot(): boolean { + return this.execution.isMultiInstanceRoot(); + } + + /** + * Changes whether this execution is a multi instance root or not. + * + * @param isMultiInstanceRoot + */ + public setMultiInstanceRoot(isMultiInstanceRoot: boolean): void { + this.execution.setMultiInstanceRoot(isMultiInstanceRoot); + } + + /** + * Returns all variables. This will include all variables of parent scopes too. + */ + public getVariables(): Map { + const variables = this.execution.getVariables(); + for (const [key, value] of variables) { + variables.set(key, this.parseValue(value)); + } + return variables; + } + + /** + * Returns all variables, as instances of the {@link VariableInstance} interface, which gives more information than only the value (type, execution id, etc.) + */ + public getVariableInstances(): Map { + return this.execution.getVariableInstances(); + } + + /** + * Returns the variable local to this scope only. So, in contrary to {@link #getVariables()}, the variables from the parent scope won't be returned. + */ + public getVariablesLocal(): Map { + const variablesLocal = this.execution.getVariablesLocal(); + for (const [key, value] of variablesLocal) { + variablesLocal.set(key, this.parseValue(value)); + } + return variablesLocal; + } + + /** + * Returns the variables local to this scope as instances of the {@link VariableInstance} interface, which provided additional information about the variable. + */ + public getVariableInstancesLocal(): Map { + return this.execution.getVariableInstancesLocal(); + } + + /** + * Returns the variable value for one specific variable. Will look in parent scopes when the variable does not exist on this particular scope. + */ + public getVariable(variableName: string): any { + return this.parseValue(this.execution.getVariable(variableName)); + } + + /** + * Similar to {@link #getVariable(String)}, but returns a {@link VariableInstance} instance, which contains more information than just the value. + */ + public getVariableInstance(variableName: string): any { + return this.execution.getVariableInstance(variableName); + } + + /** + * Returns the value for the specific variable and only checks this scope and not any parent scope. + */ + public getVariableLocal(variableName: string): any { + return this.parseValue(this.execution.getVariableLocal(variableName)); + } + + /** + * Similar to {@link #getVariableLocal(String)}, but returns an instance of {@link VariableInstance}, which has some additional information beyond the value. + */ + public getVariableInstanceLocal(variableName: string): any { + return this.execution.getVariableInstanceLocal(variableName); + } + + /** + * Returns all the names of the variables for this scope and all parent scopes. + */ + public getVariableNames(): Set { + const variableNames = new Set(); + for (const next of this.execution.getVariableNames().toArray()) { + variableNames.add(next); + } + return variableNames; + } + + /** + * Returns all the names of the variables for this scope (no parent scopes). + */ + public getVariableNamesLocal(): Set { + const variableNamesLocal = new Set(); + for (const next of this.execution.getVariableNamesLocal().toArray()) { + variableNamesLocal.add(next); + } + return variableNamesLocal; + } + + /** + * Sets the variable with the provided name to the provided value. In the case when variable name is an expression + * which is resolved by expression manager, the value is set in the object resolved from the expression. + * + *

+ * A variable is set according to the following algorithm: + * + *

    + *
  • If variable name is an expression, resolve expression and set the value on the resolved object.
  • + *
  • If this scope already contains a variable by the provided name as a local variable, its value is overwritten to the provided value.
  • + *
  • If this scope does not contain a variable by the provided name as a local variable, the variable is set to this scope's parent scope, if there is one. If there is no parent + * scope (meaning this scope is the root scope of the hierarchy it belongs to), this scope is used. This applies recursively up the parent scope chain until, if no scope contains a local variable + * by the provided name, ultimately the root scope is reached and the variable value is set on that scope.
  • + *
+ * In practice for most cases, this algorithm will set variables to the scope of the execution at the process instance’s root level, if there is no execution-local variable by the provided name. + * + * @param variableName + * the name of the variable to be set + * @param value + * the value of the variable to be set + */ + public setVariable(variableName: string, value: any): void { + this.execution.setVariable(variableName, this.stringifyValue(value)); + } + + /** + * Similar to {@link #setVariable(String, Object)}, but the variable is set to this scope specifically. Variable name + is handled as a variable name string without resolving an expression. + */ + public setVariableLocal(variableName: string, value: any): any { + return this.execution.setVariableLocal(variableName, this.stringifyValue(value)); + } + + /** + * Sets the provided variables to the variable scope. + * + *

+ * Variables are set according algorithm for {@link #setVariable(String, Object)}, applied separately to each variable. + * + * @param variables + * a map of keys and values for the variables to be set + */ + public setVariables(variables: Map): void { + for (const [key, value] of variables) { + variables.set(key, this.stringifyValue(value)); + } + this.execution.setVariables(variables); + } + + /** + * Similar to {@link #setVariables(Map)}, but the variable are set on this scope specifically. + */ + public setVariablesLocal(variables: Map): void { + for (const [key, value] of variables) { + variables.set(key, this.stringifyValue(value)); + } + this.execution.setVariablesLocal(variables); + } + + /** + * Returns whether this scope or any parent scope has variables. + */ + public hasVariables(): boolean { + return this.execution.hasVariables(); + } + + /** + * Returns whether this scope has variables. + */ + public hasVariablesLocal(): boolean { + return this.execution.hasVariablesLocal(); + } + + /** + * Returns whether this scope or any parent scope has a specific variable. + */ + public hasVariable(variableName: string): boolean { + return this.execution.hasVariable(variableName); + } + + /** + * Returns whether this scope has a specific variable. + */ + public hasVariableLocal(variableName: string): boolean { + return this.execution.hasVariableLocal(variableName); + } + + /** + * Removes the variable and creates a new HistoricVariableUpdate. + */ + public removeVariable(variableName: string): void { + this.execution.removeVariable(variableName); + } + + /** + * Removes the local variable and creates a new HistoricVariableUpdate. + */ + public removeVariableLocal(variableName: string): void { + this.execution.removeVariableLocal(variableName); + } + + /** + * Removes the variables and creates a new HistoricVariableUpdate for each of them. + */ + public removeVariables(variableNames: string[]): void { + this.execution.removeVariables(variableNames); + } + + /** + * Removes the local variables and creates a new HistoricVariableUpdate for each of them. + */ + public removeVariablesLocal(variableNames: string[]): void { + this.execution.removeVariablesLocal(variableNames); + } + + /** + * Similar to {@link #setVariable(String, Object)}, but the variable is transient: + * + * - no history is kept for the variable - the variable is only available until a waitstate is reached in the process - transient variables 'shadow' persistent variable (when getVariable('abc') + * where 'abc' is both persistent and transient, the transient value is returned. + */ + public setTransientVariable(variableName: string, variableValue: any): void { + this.execution.setTransientVariable(variableName, this.stringifyValue(variableValue)); + } + + /** + * Similar to {@link #setVariableLocal(String, Object)}, but for a transient variable. See {@link #setTransientVariable(String, Object)} for the rules on 'transient' variables. + */ + public setTransientVariableLocal(variableName: string, variableValue: any): void { + this.execution.setTransientVariableLocal(variableName, this.stringifyValue(variableValue)); + } + + /** + * Similar to {@link #setVariables(Map)}, but for transient variables. See {@link #setTransientVariable(String, Object)} for the rules on 'transient' variables. + */ + public setTransientVariables(transientVariables: Map): void { + for (const [key, value] of transientVariables) { + transientVariables.set(key, this.stringifyValue(value)); + } + this.execution.setTransientVariables(transientVariables); + } + + /** + * Similar to {@link #getVariable(String)}, including the searching via the parent scopes, but for transient variables only. See {@link #setTransientVariable(String, Object)} for the rules on + * 'transient' variables. + */ + public getTransientVariable(variableName: string): any { + return this.parseValue(this.execution.getTransientVariable(variableName)); + } + + /** + * Similar to {@link #getVariables()}, but for transient variables only. See {@link #setTransientVariable(String, Object)} for the rules on 'transient' variables. + */ + public getTransientVariables(): Map { + const transientVariables = this.execution.getTransientVariables(); + for (const [key, value] of transientVariables) { + transientVariables.set(key, this.parseValue(value)); + } + return transientVariables; } - public getCallbackType(): string | undefined { - return this.data.callbackType ?? undefined; + /** + * Similar to {@link #setVariablesLocal(Map)}, but for transient variables. See {@link #setTransientVariable(String, Object)} for the rules on 'transient' variables. + */ + public setTransientVariablesLocal(transientVariables: Map): void { + for (const [key, value] of transientVariables) { + transientVariables.set(key, this.stringifyValue(value)); + } + this.execution.setTransientVariablesLocal(transientVariables); } - public getVariable(variableName: string): any | undefined { - return this.getVariables()[variableName]; + /** + * Similar to {@link #getVariableLocal(String)}, but for a transient variable. See {@link #setTransientVariable(String, Object)} for the rules on 'transient' variables. + */ + public getTransientVariableLocal(variableName: string): any { + return this.parseValue(this.execution.getTransientVariableLocal(variableName)); } - public getVariables(): Record { - return this.data.variables ?? {}; + /** + * Similar to {@link #getVariableLocal(String)}, but for transient variables only. See {@link #setTransientVariable(String, Object)} for the rules on 'transient' variables. + */ + public getTransientVariablesLocal(): Map { + const transientVariablesLocal = this.execution.getTransientVariablesLocal(); + for (const [key, value] of transientVariablesLocal) { + transientVariablesLocal.set(key, this.parseValue(value)); + } + return transientVariablesLocal; + } + + /** + * Removes a specific transient variable (also searching parent scopes). See {@link #setTransientVariable(String, Object)} for the rules on 'transient' variables. + */ + public removeTransientVariableLocal(variableName: string): void { + this.execution.removeTransientVariableLocal(variableName); + } + + /** + * Removes a specific transient variable. See {@link #setTransientVariable(String, Object)} for the rules on 'transient' variables. + */ + public removeTransientVariable(variableName: string): void { + this.execution.removeTransientVariable(variableName); + } + + /** + * Remove all transient variable of this scope and its parent scopes. See {@link #setTransientVariable(String, Object)} for the rules on 'transient' variables. + */ + public removeTransientVariables(): void { + this.execution.removeTransientVariables(); + } + + /** + * Removes all local transient variables. See {@link #setTransientVariable(String, Object)} for the rules on 'transient' variables. + */ + public removeTransientVariablesLocal(): void { + this.execution.removeTransientVariablesLocal(); + } + + private parseValue(value: any) { + try { + return JSON.parse(value); + } catch (e) { + // Do nothing + } + return value; + } + + private stringifyValue(value: any): any { + if (Array.isArray(value)) { + // @ts-ignore + return java.util.Arrays.asList(value.map(e => JSON.stringify(e))); + } else if (typeof value === 'object') { + return JSON.stringify(value); + } + return value; } - } // @ts-ignore diff --git a/components/engine/engine-bpm-flowable/src/main/java/org/eclipse/dirigible/components/engine/bpm/flowable/delegate/DirigibleCallDelegate.java b/components/engine/engine-bpm-flowable/src/main/java/org/eclipse/dirigible/components/engine/bpm/flowable/delegate/DirigibleCallDelegate.java index f1c2003fb8..239eb26796 100644 --- a/components/engine/engine-bpm-flowable/src/main/java/org/eclipse/dirigible/components/engine/bpm/flowable/delegate/DirigibleCallDelegate.java +++ b/components/engine/engine-bpm-flowable/src/main/java/org/eclipse/dirigible/components/engine/bpm/flowable/delegate/DirigibleCallDelegate.java @@ -15,8 +15,6 @@ import java.util.HashMap; import java.util.Map; import java.util.regex.Pattern; -import org.eclipse.dirigible.commons.api.helpers.GsonHelper; -import org.eclipse.dirigible.components.engine.bpm.flowable.dto.ExecutionData; import org.eclipse.dirigible.components.open.telemetry.OpenTelemetryProvider; import org.eclipse.dirigible.graalium.core.DirigibleJavascriptCodeRunner; import org.eclipse.dirigible.repository.api.RepositoryPath; @@ -26,7 +24,6 @@ import org.flowable.engine.impl.el.FixedValue; import org.graalvm.polyglot.Source; import org.graalvm.polyglot.Value; -import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; import io.opentelemetry.api.trace.Span; import io.opentelemetry.api.trace.Tracer; @@ -248,9 +245,7 @@ private void executeInternal(DelegateExecution execution) { } Map context = new HashMap<>(); - ExecutionData executionData = new ExecutionData(); - BeanUtils.copyProperties(execution, executionData); - context.put("execution", GsonHelper.toJson(executionData)); + context.put("execution", execution); if (type == null) { type = new FixedValue("javascript"); } diff --git a/components/engine/engine-bpm-flowable/src/main/java/org/eclipse/dirigible/components/engine/bpm/flowable/dto/ExecutionData.java b/components/engine/engine-bpm-flowable/src/main/java/org/eclipse/dirigible/components/engine/bpm/flowable/dto/ExecutionData.java deleted file mode 100644 index 8e234e18c3..0000000000 --- a/components/engine/engine-bpm-flowable/src/main/java/org/eclipse/dirigible/components/engine/bpm/flowable/dto/ExecutionData.java +++ /dev/null @@ -1,1028 +0,0 @@ -/* - * Copyright (c) 2024 Eclipse Dirigible contributors - * - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html - * - * SPDX-FileCopyrightText: Eclipse Dirigible contributors SPDX-License-Identifier: EPL-2.0 - */ -package org.eclipse.dirigible.components.engine.bpm.flowable.dto; - -import java.util.Date; -import java.util.Map; - -/** - * The Class ExecutionData. - */ -public class ExecutionData { - - /** The id. */ - protected String id; - - /** The revision. */ - protected int revision; - - /** The is inserted. */ - protected boolean isInserted; - - /** The is updated. */ - protected boolean isUpdated; - - /** The is deleted. */ - protected boolean isDeleted; - - /** The tenant id. */ - protected String tenantId = ""; - - /** The name. */ - protected String name; - - /** The description. */ - protected String description; - - /** The localized name. */ - protected String localizedName; - - /** The localized description. */ - protected String localizedDescription; - - /** The lock time. */ - protected Date lockTime; - - /** The is active. */ - protected boolean isActive = true; - - /** The is scope. */ - protected boolean isScope = true; - - /** The is concurrent. */ - protected boolean isConcurrent; - - /** The is ended. */ - protected boolean isEnded; - - /** The is event scope. */ - protected boolean isEventScope; - - /** The is multi instance root. */ - protected boolean isMultiInstanceRoot; - - /** The is count enabled. */ - protected boolean isCountEnabled; - - /** The event name. */ - protected String eventName; - - /** The delete reason. */ - protected String deleteReason; - - /** The suspension state. */ - protected int suspensionState = 1; - - /** The start activity id. */ - protected String startActivityId; - - /** The start user id. */ - protected String startUserId; - - /** The start time. */ - protected Date startTime; - - /** The event subscription count. */ - protected int eventSubscriptionCount; - - /** The task count. */ - protected int taskCount; - - /** The job count. */ - protected int jobCount; - - /** The timer job count. */ - protected int timerJobCount; - - /** The suspended job count. */ - protected int suspendedJobCount; - - /** The dead letter job count. */ - protected int deadLetterJobCount; - - /** The variable count. */ - protected int variableCount; - - /** The identity link count. */ - protected int identityLinkCount; - - /** The process definition id. */ - protected String processDefinitionId; - - /** The process definition key. */ - protected String processDefinitionKey; - - /** The process definition name. */ - protected String processDefinitionName; - - /** The process definition version. */ - protected Integer processDefinitionVersion; - - /** The deployment id. */ - protected String deploymentId; - - /** The activity id. */ - protected String activityId; - - /** The activity name. */ - protected String activityName; - - /** The process instance id. */ - protected String processInstanceId; - - /** The business key. */ - protected String businessKey; - - /** The parent id. */ - protected String parentId; - - /** The super execution id. */ - protected String superExecutionId; - - /** The root process instance id. */ - protected String rootProcessInstanceId; - - /** The forced update. */ - protected boolean forcedUpdate; - - /** The callback id. */ - protected String callbackId; - - /** The callback type. */ - protected String callbackType; - - /** The variables. */ - protected Map variables; - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return id; - } - - /** - * Sets the id. - * - * @param id the new id - */ - public void setId(String id) { - this.id = id; - } - - /** - * Gets the revision. - * - * @return the revision - */ - public int getRevision() { - return revision; - } - - /** - * Sets the revision. - * - * @param revision the new revision - */ - public void setRevision(int revision) { - this.revision = revision; - } - - /** - * Checks if is inserted. - * - * @return true, if is inserted - */ - public boolean isInserted() { - return isInserted; - } - - /** - * Sets the inserted. - * - * @param isInserted the new inserted - */ - public void setInserted(boolean isInserted) { - this.isInserted = isInserted; - } - - /** - * Checks if is updated. - * - * @return true, if is updated - */ - public boolean isUpdated() { - return isUpdated; - } - - /** - * Sets the updated. - * - * @param isUpdated the new updated - */ - public void setUpdated(boolean isUpdated) { - this.isUpdated = isUpdated; - } - - /** - * Checks if is deleted. - * - * @return true, if is deleted - */ - public boolean isDeleted() { - return isDeleted; - } - - /** - * Sets the deleted. - * - * @param isDeleted the new deleted - */ - public void setDeleted(boolean isDeleted) { - this.isDeleted = isDeleted; - } - - /** - * Gets the tenant id. - * - * @return the tenant id - */ - public String getTenantId() { - return tenantId; - } - - /** - * Sets the tenant id. - * - * @param tenantId the new tenant id - */ - public void setTenantId(String tenantId) { - this.tenantId = tenantId; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Sets the name. - * - * @param name the new name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Sets the description. - * - * @param description the new description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Gets the localized name. - * - * @return the localized name - */ - public String getLocalizedName() { - return localizedName; - } - - /** - * Sets the localized name. - * - * @param localizedName the new localized name - */ - public void setLocalizedName(String localizedName) { - this.localizedName = localizedName; - } - - /** - * Gets the localized description. - * - * @return the localized description - */ - public String getLocalizedDescription() { - return localizedDescription; - } - - /** - * Sets the localized description. - * - * @param localizedDescription the new localized description - */ - public void setLocalizedDescription(String localizedDescription) { - this.localizedDescription = localizedDescription; - } - - /** - * Gets the lock time. - * - * @return the lock time - */ - public Date getLockTime() { - return lockTime; - } - - /** - * Sets the lock time. - * - * @param lockTime the new lock time - */ - public void setLockTime(Date lockTime) { - this.lockTime = lockTime; - } - - /** - * Checks if is active. - * - * @return true, if is active - */ - public boolean isActive() { - return isActive; - } - - /** - * Sets the active. - * - * @param isActive the new active - */ - public void setActive(boolean isActive) { - this.isActive = isActive; - } - - /** - * Checks if is scope. - * - * @return true, if is scope - */ - public boolean isScope() { - return isScope; - } - - /** - * Sets the scope. - * - * @param isScope the new scope - */ - public void setScope(boolean isScope) { - this.isScope = isScope; - } - - /** - * Checks if is concurrent. - * - * @return true, if is concurrent - */ - public boolean isConcurrent() { - return isConcurrent; - } - - /** - * Sets the concurrent. - * - * @param isConcurrent the new concurrent - */ - public void setConcurrent(boolean isConcurrent) { - this.isConcurrent = isConcurrent; - } - - /** - * Checks if is ended. - * - * @return true, if is ended - */ - public boolean isEnded() { - return isEnded; - } - - /** - * Sets the ended. - * - * @param isEnded the new ended - */ - public void setEnded(boolean isEnded) { - this.isEnded = isEnded; - } - - /** - * Checks if is event scope. - * - * @return true, if is event scope - */ - public boolean isEventScope() { - return isEventScope; - } - - /** - * Sets the event scope. - * - * @param isEventScope the new event scope - */ - public void setEventScope(boolean isEventScope) { - this.isEventScope = isEventScope; - } - - /** - * Checks if is multi instance root. - * - * @return true, if is multi instance root - */ - public boolean isMultiInstanceRoot() { - return isMultiInstanceRoot; - } - - /** - * Sets the multi instance root. - * - * @param isMultiInstanceRoot the new multi instance root - */ - public void setMultiInstanceRoot(boolean isMultiInstanceRoot) { - this.isMultiInstanceRoot = isMultiInstanceRoot; - } - - /** - * Checks if is count enabled. - * - * @return true, if is count enabled - */ - public boolean isCountEnabled() { - return isCountEnabled; - } - - /** - * Sets the count enabled. - * - * @param isCountEnabled the new count enabled - */ - public void setCountEnabled(boolean isCountEnabled) { - this.isCountEnabled = isCountEnabled; - } - - /** - * Gets the event name. - * - * @return the event name - */ - public String getEventName() { - return eventName; - } - - /** - * Sets the event name. - * - * @param eventName the new event name - */ - public void setEventName(String eventName) { - this.eventName = eventName; - } - - /** - * Gets the delete reason. - * - * @return the delete reason - */ - public String getDeleteReason() { - return deleteReason; - } - - /** - * Sets the delete reason. - * - * @param deleteReason the new delete reason - */ - public void setDeleteReason(String deleteReason) { - this.deleteReason = deleteReason; - } - - /** - * Gets the suspension state. - * - * @return the suspension state - */ - public int getSuspensionState() { - return suspensionState; - } - - /** - * Sets the suspension state. - * - * @param suspensionState the new suspension state - */ - public void setSuspensionState(int suspensionState) { - this.suspensionState = suspensionState; - } - - /** - * Gets the start activity id. - * - * @return the start activity id - */ - public String getStartActivityId() { - return startActivityId; - } - - /** - * Sets the start activity id. - * - * @param startActivityId the new start activity id - */ - public void setStartActivityId(String startActivityId) { - this.startActivityId = startActivityId; - } - - /** - * Gets the start user id. - * - * @return the start user id - */ - public String getStartUserId() { - return startUserId; - } - - /** - * Sets the start user id. - * - * @param startUserId the new start user id - */ - public void setStartUserId(String startUserId) { - this.startUserId = startUserId; - } - - /** - * Gets the start time. - * - * @return the start time - */ - public Date getStartTime() { - return startTime; - } - - /** - * Sets the start time. - * - * @param startTime the new start time - */ - public void setStartTime(Date startTime) { - this.startTime = startTime; - } - - /** - * Gets the event subscription count. - * - * @return the event subscription count - */ - public int getEventSubscriptionCount() { - return eventSubscriptionCount; - } - - /** - * Sets the event subscription count. - * - * @param eventSubscriptionCount the new event subscription count - */ - public void setEventSubscriptionCount(int eventSubscriptionCount) { - this.eventSubscriptionCount = eventSubscriptionCount; - } - - /** - * Gets the task count. - * - * @return the task count - */ - public int getTaskCount() { - return taskCount; - } - - /** - * Sets the task count. - * - * @param taskCount the new task count - */ - public void setTaskCount(int taskCount) { - this.taskCount = taskCount; - } - - /** - * Gets the job count. - * - * @return the job count - */ - public int getJobCount() { - return jobCount; - } - - /** - * Sets the job count. - * - * @param jobCount the new job count - */ - public void setJobCount(int jobCount) { - this.jobCount = jobCount; - } - - /** - * Gets the timer job count. - * - * @return the timer job count - */ - public int getTimerJobCount() { - return timerJobCount; - } - - /** - * Sets the timer job count. - * - * @param timerJobCount the new timer job count - */ - public void setTimerJobCount(int timerJobCount) { - this.timerJobCount = timerJobCount; - } - - /** - * Gets the suspended job count. - * - * @return the suspended job count - */ - public int getSuspendedJobCount() { - return suspendedJobCount; - } - - /** - * Sets the suspended job count. - * - * @param suspendedJobCount the new suspended job count - */ - public void setSuspendedJobCount(int suspendedJobCount) { - this.suspendedJobCount = suspendedJobCount; - } - - /** - * Gets the dead letter job count. - * - * @return the dead letter job count - */ - public int getDeadLetterJobCount() { - return deadLetterJobCount; - } - - /** - * Sets the dead letter job count. - * - * @param deadLetterJobCount the new dead letter job count - */ - public void setDeadLetterJobCount(int deadLetterJobCount) { - this.deadLetterJobCount = deadLetterJobCount; - } - - /** - * Gets the variable count. - * - * @return the variable count - */ - public int getVariableCount() { - return variableCount; - } - - /** - * Sets the variable count. - * - * @param variableCount the new variable count - */ - public void setVariableCount(int variableCount) { - this.variableCount = variableCount; - } - - /** - * Gets the identity link count. - * - * @return the identity link count - */ - public int getIdentityLinkCount() { - return identityLinkCount; - } - - /** - * Sets the identity link count. - * - * @param identityLinkCount the new identity link count - */ - public void setIdentityLinkCount(int identityLinkCount) { - this.identityLinkCount = identityLinkCount; - } - - /** - * Gets the process definition id. - * - * @return the process definition id - */ - public String getProcessDefinitionId() { - return processDefinitionId; - } - - /** - * Sets the process definition id. - * - * @param processDefinitionId the new process definition id - */ - public void setProcessDefinitionId(String processDefinitionId) { - this.processDefinitionId = processDefinitionId; - } - - /** - * Gets the process definition key. - * - * @return the process definition key - */ - public String getProcessDefinitionKey() { - return processDefinitionKey; - } - - /** - * Sets the process definition key. - * - * @param processDefinitionKey the new process definition key - */ - public void setProcessDefinitionKey(String processDefinitionKey) { - this.processDefinitionKey = processDefinitionKey; - } - - /** - * Gets the process definition name. - * - * @return the process definition name - */ - public String getProcessDefinitionName() { - return processDefinitionName; - } - - /** - * Sets the process definition name. - * - * @param processDefinitionName the new process definition name - */ - public void setProcessDefinitionName(String processDefinitionName) { - this.processDefinitionName = processDefinitionName; - } - - /** - * Gets the process definition version. - * - * @return the process definition version - */ - public Integer getProcessDefinitionVersion() { - return processDefinitionVersion; - } - - /** - * Sets the process definition version. - * - * @param processDefinitionVersion the new process definition version - */ - public void setProcessDefinitionVersion(Integer processDefinitionVersion) { - this.processDefinitionVersion = processDefinitionVersion; - } - - /** - * Gets the deployment id. - * - * @return the deployment id - */ - public String getDeploymentId() { - return deploymentId; - } - - /** - * Sets the deployment id. - * - * @param deploymentId the new deployment id - */ - public void setDeploymentId(String deploymentId) { - this.deploymentId = deploymentId; - } - - /** - * Gets the activity id. - * - * @return the activity id - */ - public String getActivityId() { - return activityId; - } - - /** - * Sets the activity id. - * - * @param activityId the new activity id - */ - public void setActivityId(String activityId) { - this.activityId = activityId; - } - - /** - * Gets the activity name. - * - * @return the activity name - */ - public String getActivityName() { - return activityName; - } - - /** - * Sets the activity name. - * - * @param activityName the new activity name - */ - public void setActivityName(String activityName) { - this.activityName = activityName; - } - - /** - * Gets the process instance id. - * - * @return the process instance id - */ - public String getProcessInstanceId() { - return processInstanceId; - } - - /** - * Sets the process instance id. - * - * @param processInstanceId the new process instance id - */ - public void setProcessInstanceId(String processInstanceId) { - this.processInstanceId = processInstanceId; - } - - /** - * Gets the business key. - * - * @return the business key - */ - public String getBusinessKey() { - return businessKey; - } - - /** - * Sets the business key. - * - * @param businessKey the new business key - */ - public void setBusinessKey(String businessKey) { - this.businessKey = businessKey; - } - - /** - * Gets the parent id. - * - * @return the parent id - */ - public String getParentId() { - return parentId; - } - - /** - * Sets the parent id. - * - * @param parentId the new parent id - */ - public void setParentId(String parentId) { - this.parentId = parentId; - } - - /** - * Gets the super execution id. - * - * @return the super execution id - */ - public String getSuperExecutionId() { - return superExecutionId; - } - - /** - * Sets the super execution id. - * - * @param superExecutionId the new super execution id - */ - public void setSuperExecutionId(String superExecutionId) { - this.superExecutionId = superExecutionId; - } - - /** - * Gets the root process instance id. - * - * @return the root process instance id - */ - public String getRootProcessInstanceId() { - return rootProcessInstanceId; - } - - /** - * Sets the root process instance id. - * - * @param rootProcessInstanceId the new root process instance id - */ - public void setRootProcessInstanceId(String rootProcessInstanceId) { - this.rootProcessInstanceId = rootProcessInstanceId; - } - - /** - * Checks if is forced update. - * - * @return true, if is forced update - */ - public boolean isForcedUpdate() { - return forcedUpdate; - } - - /** - * Sets the forced update. - * - * @param forcedUpdate the new forced update - */ - public void setForcedUpdate(boolean forcedUpdate) { - this.forcedUpdate = forcedUpdate; - } - - /** - * Gets the callback id. - * - * @return the callback id - */ - public String getCallbackId() { - return callbackId; - } - - /** - * Sets the callback id. - * - * @param callbackId the new callback id - */ - public void setCallbackId(String callbackId) { - this.callbackId = callbackId; - } - - /** - * Gets the callback type. - * - * @return the callback type - */ - public String getCallbackType() { - return callbackType; - } - - /** - * Sets the callback type. - * - * @param callbackType the new callback type - */ - public void setCallbackType(String callbackType) { - this.callbackType = callbackType; - } - - /** - * Gets the variables. - * - * @return the variables - */ - public Map getVariables() { - return variables; - } - - /** - * Sets the variables. - * - * @param variables the new callback type - */ - public void setVariables(Map variables) { - this.variables = variables; - } - -}