org.acme.travels.usertasks.CustomHumanTaskLifeCycle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of process-usertasks-custom-lifecycle-quarkus
Show all versions of process-usertasks-custom-lifecycle-quarkus
Kogito user tasks orchestration with custom life cycle - Quarkus
package org.acme.travels.usertasks;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;
import org.jbpm.process.instance.impl.humantask.BaseHumanTaskLifeCycle;
import org.jbpm.process.instance.impl.humantask.HumanTaskWorkItemImpl;
import org.jbpm.process.instance.impl.humantask.phases.Claim;
import org.jbpm.process.instance.impl.humantask.phases.Release;
import org.jbpm.process.instance.impl.humantask.phases.Skip;
import org.jbpm.process.instance.impl.workitem.Abort;
import org.jbpm.process.instance.impl.workitem.Active;
import org.jbpm.process.instance.impl.workitem.Complete;
import org.kie.api.runtime.process.WorkItem;
import org.kie.api.runtime.process.WorkItemManager;
import org.kie.kogito.process.workitem.InvalidLifeCyclePhaseException;
import org.kie.kogito.process.workitem.InvalidTransitionException;
import org.kie.kogito.process.workitem.LifeCycle;
import org.kie.kogito.process.workitem.LifeCyclePhase;
import org.kie.kogito.process.workitem.NotAuthorizedException;
import org.kie.kogito.process.workitem.Policy;
import org.kie.kogito.process.workitem.Transition;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Custom life cycle definition for human tasks. It comes with following phases
*
*
* - Active
* - Claim
* - Release
* - Start
* - Complete - extended one that allows to only complete started tasks
* - Skip
* - Abort
*
* At the beginning human task enters Active
phase. From there it can go to
*
*
* - Claim
* - Skip
* - Abort
*
*
* at any time. At each phase data can be associated and by that set on work item.
*
* Completion can only be performed on started tasks.
*/
public class CustomHumanTaskLifeCycle implements LifeCycle
© 2015 - 2025 Weber Informatics LLC | Privacy Policy