cancel
Showing results for 
Search instead for 
Did you mean: 

Create a workflow using a workflow template

Former Member
0 Kudos

I have create a workflow template and workflow action templates using impex, now i have to create actual workflow using this workflow temple.

How can I do it using impex. I create workflow using HMC by clicking 'Create workflow' button below the action script section of workflow template general tab.

But I want to automate this using impex.

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I am trying to add new automated workflow, but at the time of creation, the hmc throwing attached error. My automated workflow bean code is like

/** / package com.skillnetlw.core.workflow;

import de.hybris.platform.workflow.model.WorkflowActionModel; import de.hybris.platform.workflow.model.WorkflowDecisionModel;

import org.apache.log4j.Logger;

/** @author mtiwari */ public class CustomAutoWorkFlow implements de.hybris.platform.workflow.jobs.AutomatedWorkflowTemplateJob {

 /*
  * (non-Javadoc)
  * 
  * @see de.hybris.platform.workflow.jobs.AutomatedWorkflowTemplateJob#perform(de.hybris.platform.workflow.model.
  * WorkflowActionModel)
  */
 private static final Logger LOG = Logger.getLogger(CustomAutoWorkFlow.class.getName());

 @Override
 public WorkflowDecisionModel perform(final WorkflowActionModel action)
 {
     LOG.info("This will complete the action automatically without any user interaction");
     // YTODO Auto-generated m
     for (final WorkflowDecisionModel decision : action.getDecisions())
     {
         LOG.info("decision: " + decision.getDescription());
         return decision;
     }
     return null;
 }

}

and its configuration is below

Former Member
0 Kudos

Attached is an example of how you can do this. This example is for adding new products to the system and starting a workflow which in the attached is named 'SampleWorkflow'. You will need to make sure you change the workflow name to match your workflow also. sample workflow