Search in sources :

Example 6 with MergeObjectCommand

use of org.jbpm.shared.services.impl.commands.MergeObjectCommand in project jbpm by kiegroup.

the class DeploymentStore method markDeploymentUnitAsObsolete.

public void markDeploymentUnitAsObsolete(DeploymentUnit unit) {
    DeploymentStoreEntry entry = findDeploymentStoreByDeploymentId(unit.getIdentifier());
    if (entry != null) {
        // update only
        // 0 - disabled, 1 - enabled, -1 - obsolete
        entry.setState(STATE_OBSOLETE);
        entry.setUpdateDate(new Date());
        commandService.execute(new MergeObjectCommand(entry));
    }
}
Also used : MergeObjectCommand(org.jbpm.shared.services.impl.commands.MergeObjectCommand) Date(java.util.Date)

Aggregations

Date (java.util.Date)6 MergeObjectCommand (org.jbpm.shared.services.impl.commands.MergeObjectCommand)6 PersistObjectCommand (org.jbpm.shared.services.impl.commands.PersistObjectCommand)2 ArrayList (java.util.ArrayList)1 AttributesAware (org.jbpm.kie.services.api.AttributesAware)1