Skip to content

Instantly share code, notes, and snippets.

@madaboutcode
Created October 13, 2014 05:45
Show Gist options
  • Select an option

  • Save madaboutcode/c4051f9eae47e9c0cd22 to your computer and use it in GitHub Desktop.

Select an option

Save madaboutcode/c4051f9eae47e9c0cd22 to your computer and use it in GitHub Desktop.

Revisions

  1. Ajeesh Mohan created this gist Oct 13, 2014.
    14 changes: 14 additions & 0 deletions addflow.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    <flow name="addFlow">
    <http:inbound-endpoint keep-alive="true" exchange-pattern="request-response" host="localhost" port="${http.port}" path="add"/>

    <transformer ref="httpToMapTransformer"/>

    <message-properties-transformer scope="invocation">
    <add-message-property key="contextName" value="#[map-payload:campaignName]" />
    </message-properties-transformer>

    <dynamicflows:add contextName="#[variable:contextName]">
    <dynamicflows:configs ref="#[payload]" />
    </dynamicflows:add>

    </flow>
    12 changes: 12 additions & 0 deletions runflow.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    <flow name="runFlow">
    <http:inbound-endpoint keep-alive="true" exchange-pattern="request-response" host="localhost" port="${http.port}" path="run"/>
    <transformer ref="httpToMapTransformer"/>

    <message-properties-transformer scope="invocation">
    <add-message-property key="contextName" value="#[map-payload:campaignName]" />
    </message-properties-transformer>


    <dynamicflows:run contextName="#[variable:contextName]" flowName="act"/>

    </flow>