Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

AEM 6.4, SP-1 and SP-2 workflow and launcher creation

Avatar

Avatar
Shape 1
Level 2
toimrank
Level 2

Likes

9 likes

Total Posts

22 posts

Correct Reply

1 solution
Top badges earned
Shape 1
Validate 1
Give Back
Boost 5
Boost 3
View profile

Avatar
Shape 1
Level 2
toimrank
Level 2

Likes

9 likes

Total Posts

22 posts

Correct Reply

1 solution
Top badges earned
Shape 1
Validate 1
Give Back
Boost 5
Boost 3
View profile
toimrank
Level 2

15-11-2018

Hi All,

We are migrating from 6.1 to 6.4 and faced multiple issues while doing this.

Please find out below steps to create workflow and launchers in AEM 6.4, SP-1 and SP-2.

Workflow class:

import org.osgi.service.component.annotations.Component;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.adobe.granite.workflow.WorkflowException;
import com.adobe.granite.workflow.WorkflowSession;
import com.adobe.granite.workflow.exec.WorkItem;
import com.adobe.granite.workflow.exec.WorkflowProcess;
import com.adobe.granite.workflow.metadata.MetaDataMap;

@Component(service=WorkflowProcess.class, property = {"process.label=ik practise",
   org.osgi.framework.Constants.SERVICE_DESCRIPTION+"=Add opt out key to resource",
   org.osgi.framework.Constants.SERVICE_VENDOR+"=The Coca-Cola Company - FreeStyle CMS",
   "value=Add Optout Key"})

public class CustomStep implements WorkflowProcess {

   private static final Logger log = LoggerFactory.getLogger(CustomStep.class);
  public void execute(WorkItem item, WorkflowSession session, MetaDataMap args) throws WorkflowException {

        log.info("========Workflow called ========");
   }

}

Launcher:

In 6.4 Adobe suggested to create launchers in /conf/global/settings/workflow/launcher/config/update_page

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
   jcr:primaryType="cq:WorkflowLauncher"
   condition="jcr:content/sling:resourceType==weretail/components/structure/page"
   description="ik test practise"
   enabled="{Boolean}true"
   eventType="{Long}16"
   excludeList=""
   glob="/content"
   nodetype="cq:Page"
   runModes="author"
   workflow="/var/workflow/models/ikpractise/update_page/jcr:content/model"
/>

Workflow Model page:

In 6.4 Adobe suggested to create model page in /var/workflow/models/ikpractise/update_page

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"

      jcr:primaryType="cq:Page">

    <jcr:content

        cq:designPath="/etc/designs/default"

        cq:lastModified="{Date}2017-10-25T10:53:50.433+05:30"

        cq:lastModifiedBy="admin"

        cq:template="/libs/cq/workflow/templates/model"

        jcr:primaryType="cq:PageContent"

        jcr:title="LS Genomic Indexing Workflow"

        sling:resourceType="cq/workflow/components/pages/model">

        <flow

            jcr:primaryType="nt:unstructured"

            sling:resourceType="foundation/components/parsys">

            <process

                jcr:created="{Date}2017-10-25T10:53:16.696+05:30"

                jcr:createdBy="admin"

                jcr:lastModified="{Date}2017-10-25T10:53:50.428+05:30"

                jcr:lastModifiedBy="admin"

                jcr:primaryType="nt:unstructured"

                jcr:title="Genomic Indexing"

                sling:resourceType="cq/workflow/components/model/process">

                <metaData

                    jcr:primaryType="nt:unstructured"

                    PROCESS="ikpackage.core.listeners.CustomStep"

                    PROCESS_AUTO_ADVANCE="true"/>

            </process>

        </flow>

        <model/>

    </jcr:content>

</jcr:root>

Workflow Model page:

In 6.4 Adobe suggested to create model in /var/workflow/models/ikpractise/update_page/_jcr_content

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"

          jcr:isCheckedOut="{Boolean}false"

          jcr:primaryType="cq:WorkflowModel"

          jcr:uuid="fd9a69e1-a024-43dc-905e-78285cae0e01"

          sling:resourceType="cq/workflow/components/model"

          description="No Description"

          title="FOS Content Bundle Deploy Workflow">

    <metaData

            cq:lastModified="{Long}1527862148126"

            cq:lastModifiedBy="admin"

            jcr:primaryType="nt:unstructured"/>

    <nodes jcr:primaryType="nt:unstructured">

        <node0

            jcr:primaryType="cq:WorkflowNode"

            title="Start"

            type="START">

            <metaData jcr:primaryType="nt:unstructured"/>

        </node0>

        <node1

            jcr:primaryType="cq:WorkflowNode"

            title="FOS Create Bundle JSON"

            type="PROCESS">

            <metaData

                jcr:primaryType="nt:unstructured"

                PROCESS="ikpackage.core.listeners.CustomStep"

                PROCESS_AUTO_ADVANCE="true"/>

        </node1>

        <node2

            jcr:primaryType="cq:WorkflowNode"

            title="End"

            type="END">

            <metaData jcr:primaryType="nt:unstructured"/>

        </node2>

    </nodes>

    <transitions jcr:primaryType="nt:unstructured">

        <node0_x0023_node1

                jcr:primaryType="cq:WorkflowTransition"

                from="node0"

                rule=""

                to="node1">

            <metaData jcr:primaryType="nt:unstructured"/>

        </node0_x0023_node1>

        <node1_x0023_node2

                jcr:primaryType="cq:WorkflowTransition"

                from="node1"

                rule=""

                to="node2">

            <metaData jcr:primaryType="nt:unstructured"/>

        </node1_x0023_node2>

    </transitions>

</jcr:root>

Please find below image reference for the same.

workflo.PNG

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
      jcr:primaryType="cq:Page">
    <jcr:content
        cq:designPath="/etc/designs/default"
        cq:lastModified="{Date}2017-10-25T10:53:50.433+05:30"
        cq:lastModifiedBy="admin"
        cq:template="/libs/cq/workflow/templates/model"
        jcr:primaryType="cq:PageContent"
        jcr:title="LS Genomic Indexing Workflow"
        sling:resourceType="cq/workflow/components/pages/model">
        <flow
            jcr:primaryType="nt:unstructured"
            sling:resourceType="foundation/components/parsys">
            <process
                jcr:created="{Date}2017-10-25T10:53:16.696+05:30"
                jcr:createdBy="admin"
                jcr:lastModified="{Date}2017-10-25T10:53:50.428+05:30"
                jcr:lastModifiedBy="admin"
                jcr:primaryType="nt:unstructured"
                jcr:title="Genomic Indexing"
                sling:resourceType="cq/workflow/components/model/process">
                <metaData
                    jcr:primaryType="nt:unstructured"
                    PROCESS="ikpackage.core.listeners.CustomStep"
                    PROCESS_AUTO_ADVANCE="true"/>
            </process>
        </flow>
        <model/>
    </jcr:content>
</jcr:root>

For mor

2 Comments

Avatar

Avatar
Springboard
Community Manager
jantzen_belliston-Adobe
Community Manager

Likes

331 likes

Total Posts

2,247 posts

Correct Reply

811 solutions
Top badges earned
Springboard
Validate 500
Validate 250
Validate 100
Validate 50
View profile

Avatar
Springboard
Community Manager
jantzen_belliston-Adobe
Community Manager

Likes

331 likes

Total Posts

2,247 posts

Correct Reply

811 solutions
Top badges earned
Springboard
Validate 500
Validate 250
Validate 100
Validate 50
View profile
jantzen_belliston-Adobe
Community Manager

17-07-2019

The official method to submit a request for Adobe Experience Manager is via our DayCare support system. I will pass this idea along to the AEM community manager in the meantime.

kautuksahni

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,128 likes

Total Posts

6,133 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,128 likes

Total Posts

6,133 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

18-07-2019

toimrank, ​please create a question for this in the Adobe Experience Manager .