Commit 22e0cf9f authored by Simon Reis's avatar Simon Reis
Browse files

Merge branch 'DEVELOP' of...

Merge branch 'DEVELOP' of ssh://git.eclipse.org:29418/openk-usermodules/org.eclipse.openk-usermodules.gridFailureInformation.backend into SI-153-SARIS-Schnittstelle
parents 37c5ccf4 b57552ea
......@@ -20,12 +20,35 @@ import org.eclipse.openk.gridfailureinformation.bpmn.base.ProcessException;
import org.eclipse.openk.gridfailureinformation.bpmn.base.ProcessGrid;
import org.eclipse.openk.gridfailureinformation.bpmn.base.ProcessTask;
import org.eclipse.openk.gridfailureinformation.bpmn.base.tasks.DecisionTask;
import org.eclipse.openk.gridfailureinformation.bpmn.impl.tasks.*;
import org.eclipse.openk.gridfailureinformation.bpmn.impl.tasks.DecideFailureInfoCanceled;
import org.eclipse.openk.gridfailureinformation.bpmn.impl.tasks.DecideFailureInfoHasSubordinatedInfos;
import org.eclipse.openk.gridfailureinformation.bpmn.impl.tasks.DecideFailureInfoPlanned;
import org.eclipse.openk.gridfailureinformation.bpmn.impl.tasks.DecideFailureInfoPublished;
import org.eclipse.openk.gridfailureinformation.bpmn.impl.tasks.DecideFailureInfoUpdated;
import org.eclipse.openk.gridfailureinformation.bpmn.impl.tasks.PublishFailureToChannelsTask;
import org.eclipse.openk.gridfailureinformation.bpmn.impl.tasks.RePublishFailureToMailChannelsTask;
import org.eclipse.openk.gridfailureinformation.bpmn.impl.tasks.ResetPublishedFlagOnChannelsTask;
import org.eclipse.openk.gridfailureinformation.bpmn.impl.tasks.SetEndDateTask;
import org.eclipse.openk.gridfailureinformation.bpmn.impl.tasks.ShortcutTask;
import org.eclipse.openk.gridfailureinformation.bpmn.impl.tasks.StoreEditStatusOfParentToChildrenTask;
import org.eclipse.openk.gridfailureinformation.bpmn.impl.tasks.StorePublishStatusTask;
import org.eclipse.openk.gridfailureinformation.bpmn.impl.tasks.UIStoreFailureInformationTask;
import org.eclipse.openk.gridfailureinformation.constants.Constants;
import org.springframework.stereotype.Component;
import static org.eclipse.openk.gridfailureinformation.bpmn.base.tasks.DecisionTask.OutputPort.*;
import static org.eclipse.openk.gridfailureinformation.bpmn.impl.GfiProcessState.*;
import static org.eclipse.openk.gridfailureinformation.bpmn.base.tasks.DecisionTask.OutputPort.NO;
import static org.eclipse.openk.gridfailureinformation.bpmn.base.tasks.DecisionTask.OutputPort.PORT1;
import static org.eclipse.openk.gridfailureinformation.bpmn.base.tasks.DecisionTask.OutputPort.PORT2;
import static org.eclipse.openk.gridfailureinformation.bpmn.base.tasks.DecisionTask.OutputPort.PORT3;
import static org.eclipse.openk.gridfailureinformation.bpmn.base.tasks.DecisionTask.OutputPort.YES;
import static org.eclipse.openk.gridfailureinformation.bpmn.impl.GfiProcessState.CANCELED;
import static org.eclipse.openk.gridfailureinformation.bpmn.impl.GfiProcessState.CHECKED_FOR_PUBLISH_;
import static org.eclipse.openk.gridfailureinformation.bpmn.impl.GfiProcessState.COMPLETED;
import static org.eclipse.openk.gridfailureinformation.bpmn.impl.GfiProcessState.CREATED;
import static org.eclipse.openk.gridfailureinformation.bpmn.impl.GfiProcessState.NEW;
import static org.eclipse.openk.gridfailureinformation.bpmn.impl.GfiProcessState.PLANNED;
import static org.eclipse.openk.gridfailureinformation.bpmn.impl.GfiProcessState.QUALIFIED;
import static org.eclipse.openk.gridfailureinformation.bpmn.impl.GfiProcessState.UPDATED;
@Log4j2
@Component
......@@ -68,8 +91,11 @@ public class GfiGrid extends ProcessGrid {
ProcessTask storeEditStatusUpdated = new ShortcutTask( UPDATED );
ProcessTask resetPublishedFlagOnChannels = new ResetPublishedFlagOnChannelsTask();
DecisionTask<GfiProcessSubject> decideHasSubordinatedInfos = new DecideFailureInfoHasSubordinatedInfos();
ProcessTask storeEditStatusOfParentForChildren = new StoreEditStatusOfParentToChildrenTask();
DecisionTask<GfiProcessSubject> decideHasSubordinatedInfosCompleted = new DecideFailureInfoHasSubordinatedInfos();
ProcessTask storeEditStatusOfParentForChildrenCompleted = new StoreEditStatusOfParentToChildrenTask();
DecisionTask<GfiProcessSubject> decideHasSubordinatedInfosCancelled = new DecideFailureInfoHasSubordinatedInfos();
ProcessTask storeEditStatusOfParentForChildrenCancelled = new StoreEditStatusOfParentToChildrenTask();
ProcessTask completedEndpoint = register( COMPLETED,
new UIStoreFailureInformationTask( "State COMPETED UI Task", true));
......@@ -105,16 +131,19 @@ public class GfiGrid extends ProcessGrid {
rePublishToMailChannelsCompleted.connectOutputTo(decidePublishedOnComplete);
decidePublishedOnComplete.connectOutputTo(YES, storePublicationStatusWithdrawn);
decidePublishedOnComplete.connectOutputTo(NO, decideHasSubordinatedInfos);
storePublicationStatusWithdrawn.connectOutputTo(decideHasSubordinatedInfos);
decideHasSubordinatedInfos.connectOutputTo(NO, completedEndpoint);
decideHasSubordinatedInfos.connectOutputTo(YES, storeEditStatusOfParentForChildren);
storeEditStatusOfParentForChildren.connectOutputTo(completedEndpoint);
decidePublishedOnComplete.connectOutputTo(NO, decideHasSubordinatedInfosCompleted);
storePublicationStatusWithdrawn.connectOutputTo(decideHasSubordinatedInfosCompleted);
decideHasSubordinatedInfosCompleted.connectOutputTo(NO, completedEndpoint);
decideHasSubordinatedInfosCompleted.connectOutputTo(YES, storeEditStatusOfParentForChildrenCompleted);
storeEditStatusOfParentForChildrenCompleted.connectOutputTo(completedEndpoint);
storeEditStatusCanceled.connectOutputTo(decidePublished);
decidePublished.connectOutputTo( YES, storePubStatusWithdrawnOnCancel);
decidePublished.connectOutputTo( NO, canceledEndpoint);
storePubStatusWithdrawnOnCancel.connectOutputTo( canceledEndpoint );
decidePublished.connectOutputTo( NO, decideHasSubordinatedInfosCancelled );
storePubStatusWithdrawnOnCancel.connectOutputTo( decideHasSubordinatedInfosCancelled );
decideHasSubordinatedInfosCancelled.connectOutputTo(YES, storeEditStatusOfParentForChildrenCancelled );
decideHasSubordinatedInfosCancelled.connectOutputTo(NO, canceledEndpoint );
storeEditStatusOfParentForChildrenCancelled.connectOutputTo( canceledEndpoint );
publishMessageToChannels.connectOutputTo(storePublicationStatusPublished);
storePublicationStatusPublished.connectOutputTo(updateMessage);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment