Configure an action for the execution of a chain

Hi,

I configured a chain like the following:

<chain id="minimum_chain">  
  <operation id="Seam.AddInfoMessage">  
    <param type="string" name="message">Success.</param>  
  </operation>  
</chain>  

Additionally I configured in another component/extension file the according action:

<action id="Chain.minimum_chain" link="" enabled="true" order="20"
    label="minimum.chain" icon="/icons/action_add.gif">  
  <category>SUBVIEW_UPPER_LIST</category>  
  <filter id="newProjectAck">  
    <rule grant="true">  
      <permission>AddChildren</permission>  
      <type>Project</type>  
    </rule>  
  </filter>  
</action>

The button is displayed correctly. I can click the button and the page reloads but nothing happens. I have no errors in the server log and it looks like nothing happens at all. I created a minimal chain to test my understanding of the mechanism but it looks like there is a missing link.

Any ideas what's wrong?

I don't find an example in the documentation which shows how to connect an action with an operation chain.

Best regards, Michael

1 votes

1 answers

2272 views

ANSWER



In the <action> element you should use:

link="#{operationActionBean.doOperation('your.chain.name')}"
0 votes



I changed the link option to:

link=&quot;#{operationActionBean.doOperation(&apos;minimum_chain&apos;)&quot;

The behaviour does not change. The page reloads but I don't see the message. The file server.log does not report any problems.

BUT I added another operation to the chain - Seam.CreateDocumentForm. This operation succeeds now. Only the message from Seam.AddInfoMessage is not visible which means perhaps that I don't understand the operation.

04/19/2012

I created a new question because I think this is at minimum a new aspect.
04/19/2012