Search in sources :

Example 1 with WorkItemFilter

use of com.day.cq.workflow.exec.filter.WorkItemFilter in project acs-aem-commons by Adobe-Consulting-Services.

the class SyntheticWorkflowSessionTest method setUp.

@Before
public void setUp() {
    session = new SyntheticWorkflowSession(new SyntheticWorkflowRunnerImpl(), resourceResolver.adaptTo(Session.class));
    workflowData = new SyntheticWorkflowData("JCR_PATH", "/content/test");
    workflowData.getMetaDataMap().put("cat", "meow");
    workflowData.getMetaDataMap().put("bird", "ka-kaw");
    syntheticWorkflow = new SyntheticWorkflow("test", workflowData);
    SyntheticWorkItem syntheticWorkItem = SyntheticWorkItem.createSyntheticWorkItem(syntheticWorkflow.getWorkflowData());
    wrappedWorkItem = (WorkItem) Proxy.newProxyInstance(WrappedSyntheticWorkItem.class.getClassLoader(), new Class[] { WorkItem.class, WrappedSyntheticWorkItem.class }, syntheticWorkItem);
    SyntheticRoute syntheticRoute = new SyntheticRoute(false);
    route = (Route) syntheticRoute;
    workItemFilter = new WorkItemFilter() {

        @Override
        public boolean doInclude(WorkItem workItem) {
            return false;
        }
    };
    workflowModelFilter = new WorkflowModelFilter() {

        @Override
        public boolean doInclude(WorkflowModel workflowModel) {
            return false;
        }
    };
}
Also used : WrappedSyntheticWorkItem(com.adobe.acs.commons.workflow.synthetic.cq.WrappedSyntheticWorkItem) SyntheticWorkflowData(com.adobe.acs.commons.workflow.synthetic.impl.SyntheticWorkflowData) WrappedSyntheticWorkItem(com.adobe.acs.commons.workflow.synthetic.cq.WrappedSyntheticWorkItem) SyntheticWorkflowRunnerImpl(com.adobe.acs.commons.workflow.synthetic.impl.SyntheticWorkflowRunnerImpl) WorkflowModelFilter(com.day.cq.workflow.model.WorkflowModelFilter) WorkflowModel(com.day.cq.workflow.model.WorkflowModel) WorkItemFilter(com.day.cq.workflow.exec.filter.WorkItemFilter) WorkItem(com.day.cq.workflow.exec.WorkItem) WrappedSyntheticWorkItem(com.adobe.acs.commons.workflow.synthetic.cq.WrappedSyntheticWorkItem) Before(org.junit.Before)

Aggregations

WrappedSyntheticWorkItem (com.adobe.acs.commons.workflow.synthetic.cq.WrappedSyntheticWorkItem)1 SyntheticWorkflowData (com.adobe.acs.commons.workflow.synthetic.impl.SyntheticWorkflowData)1 SyntheticWorkflowRunnerImpl (com.adobe.acs.commons.workflow.synthetic.impl.SyntheticWorkflowRunnerImpl)1 WorkItem (com.day.cq.workflow.exec.WorkItem)1 WorkItemFilter (com.day.cq.workflow.exec.filter.WorkItemFilter)1 WorkflowModel (com.day.cq.workflow.model.WorkflowModel)1 WorkflowModelFilter (com.day.cq.workflow.model.WorkflowModelFilter)1 Before (org.junit.Before)1