use of com.adobe.acs.commons.workflow.synthetic.impl.SyntheticWorkflowRunnerImpl in project acs-aem-commons by Adobe-Consulting-Services.
the class SyntheticWorkflowSessionTest method test_updateWorkflowData.
@Test
public void test_updateWorkflowData() throws Exception {
SyntheticWorkflowSession session = new SyntheticWorkflowSession(new SyntheticWorkflowRunnerImpl(), mock(Session.class));
SyntheticWorkflowData workflowData = new SyntheticWorkflowData("JCR_PATH", "/content/test");
workflowData.getMetaDataMap().put("cat", "meow");
workflowData.getMetaDataMap().put("bird", "ka-kaw");
SyntheticWorkflow workflow = new SyntheticWorkflow("test", workflowData);
workflowData.getMetaDataMap().put("dog", "woof");
session.updateWorkflowData(workflow, workflowData);
// This test is a bit strange since the maps should always be in sync; this updateWorkflowData simply updates itself with itself
// This is to mimic CQ Workflow behavior which has to manage this persistence via JCR nodes
Assert.assertEquals(3, workflowData.getMetaDataMap().size());
Assert.assertEquals("woof", workflowData.getMetaDataMap().get("dog"));
}
use of com.adobe.acs.commons.workflow.synthetic.impl.SyntheticWorkflowRunnerImpl in project acs-aem-commons by Adobe-Consulting-Services.
the class SyntheticWorkItemTest method setUp.
@Before
public void setUp() {
session = SyntheticWorkflowSession.createSyntheticWorkflowSession(new SyntheticWorkflowRunnerImpl(), resourceResolver.adaptTo(Session.class));
workflowData = new SyntheticWorkflowData("JCR_PATH", "/content/test");
workflowData.getMetaDataMap().put("dog", "woof");
syntheticWorkflow = new SyntheticWorkflow("test", workflowData);
syntheticWorkItem = SyntheticWorkItem.createSyntheticWorkItem(syntheticWorkflow.getWorkflowData());
}
use of com.adobe.acs.commons.workflow.synthetic.impl.SyntheticWorkflowRunnerImpl in project acs-aem-commons by Adobe-Consulting-Services.
the class SyntheticWorkflowSessionTest method setUp.
@Before
public void setUp() throws Exception {
context = new AemContext(ResourceResolverType.JCR_MOCK);
ResourceResolver resourceResolver = context.resourceResolver();
session = SyntheticWorkflowSession.createSyntheticWorkflowSession(new SyntheticWorkflowRunnerImpl(), resourceResolver.adaptTo(Session.class));
SyntheticWorkflowData workflowData = new SyntheticWorkflowData("JCR_PATH", "/content/test");
workflowData.getMetaDataMap().put("cat", "meow");
workflowData.getMetaDataMap().put("bird", "ka-kaw");
syntheticWorkflow = new SyntheticWorkflow("test", workflowData);
}
use of com.adobe.acs.commons.workflow.synthetic.impl.SyntheticWorkflowRunnerImpl 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;
}
};
}
Aggregations