אתה מציג תוכן עזרה עבור גרסה:
- 6.2
- גירסאות קודמות
You create a workflow model to define the series of steps executed when a user starts the workflow. When a user starts a workflow, an instance is started; this is a copy of the workflow model at that point in time.
When you first create a new workflow model it contains:
- The steps, Flow Start and Flow End.
These represent the beginning and end of the workflow. These steps are required and cannot be edited/removed. - An example Participant step named Step 1.
This step is configured to assign a work item to the admin user. Edit or delete this step, and add steps as required.
-
Open the Workflow Models console; for example:
http://localhost:4502/libs/cq/workflow/admin/console/content/models.html/etc/workflow/models
- Open the Workflow console. For example, http://localhost:4502/libs/cq/workflow/content/console.html.
- On the Models tab, click New. The New Workflow dialog opens.
- Type the title for your workflow and click OK.
- The new model appears in the Models tab.
- Select your model, then click Edit to open it for configuration.
Editing an existing workflow can be done in the same manner as creating a workflow - after the actual create/new action. Again, it is dependent on the UI you are using:
You can create a Transient workflow model when creating a new model, or by editing an existing one:
-
Create and/or edit the workflow model according to the UI you are using.
You will need to add steps to your model to represent the activity to perform - each step performs a specific activity. A selection of step components are available in a standard AEM instance.
When you edit a model, the available steps appear in the various groups of the Components tab in the workflow sidekick.

הערה:
For information about the primary step components that are installed with AEM, see Workflow Steps Reference.
You can Edit step components to configure and customize their behavior using the Step Properties dialogs.
-
To open the Step Properties dialog for a step either:
- Right-click the step in the workflow model and click Edit.
- Double-click on the step.
הערה:
For information about the primary step components that are installed with AEM, see Workflow Steps Reference.
-
Configure the Apache Sling Logging Configuration and Apache Sling Logging Logger Configuration (Factory Configuration) as required.
הערה:
See Logging for further information.
Test your new workflow as follows:
- Start your workflow model from the console.
- Define the Payload and click OK.
- Take actions as required so that the workflow proceeds.
- Monitor the log files while the workflow is running.
הערה:
It is a good practice when debugging a workflow to test the workflow with a variety of payload types; including types that are different to the one for which it has been developed. For example, if you intend your workflow to deal with Assets, test it by setting a Page as payload and make sure that it does not throw errors.
You can configure a form to be processed by the selected workflow. When users submit the form, a new workflow instance is created with the data of the form submission as its payload.
To configure the workflow to be used with your form:
To illustrate some of the possibilities for creating a workflow, the following example creates a variation of the Publish Example workflow.
OR Split steps allow you to introduce conditional processing paths into your workflow.
To define an OR rule, proceed as follows:
הערה:
See Using ECMAScript.
The following sample script returns true if the node is a JCR_PATH located under /content/geometrixx/en:
function check() { if (workflowData.getPayloadType() == "JCR_PATH") { var path = workflowData.getPayload().toString(); var node = jcrSession.getItem(path); if (node.getPath().indexOf("/content/geometrixx/en") >= 0) { return true; } else { return false; } } else { return false; } }
With AEM you can associate a workflow with forms (using the Forms components or AEM Forms). It enables you to build processes in which visitors will input information based on multiple forms; for example, an online registration process.
In this section you will create a two-step process to display two characteristics of the "Product of the Day". In the first step, the author will fill out the first form to define the name of the product. In the second step, the author will fill out the second form and specify the designer of the product. The result will be displayed in the Product of the Day page.
Use CRXDE Lite to find the name of the nodes (in the repository) that are associated with the paragraphs that you added to the Product of the Day page.
-
In the node tree, expand the node:
/content/geometrixx-outdoors/en/equipment/product-of-the-day/jcr:content/par
Below the par node, the colctrl nodes represent the columns on the Product of the Day page, and the col_break nodes represent the end of the columns. The left-hand column is the first colctrl node, and the right-hand column is the second colctrl node.
In the following graphic, the text nodes are text_1958199362 and text. Your node names will probably have different identifying characters following the text prefix (text_<id>).

-
Edit the Text Field component to specify the following property values:
- Element Name: ./jcr:content/par/text_****/text
- Title: Product Name:
הערה:
text<_id> is the name of the node that represents the empty paragraph on the Product of the Day page. In the previous example, the node name is text_1958199362.
- Element Name: ./jcr:content/par/text_****/text



