1 Reply Latest reply on Oct 27, 2007 6:42 AM by Vt Ysh

    How to do an action link without validating jbpm variables

    Nicolas Baumann Newbie

      Hello,

      I'm trying to put an action on a link but when the link is activated, the variables of the form are validated.

      I tried to do this :

      <h:commandLink action="#{myBean.myAction}">
      

      but this validates the variables of the form (saying the variables are required)

      So I tried this :
      <h:outputlink>
       <a4j:support event="onclick" action="#{myBean.myAction}">
      </h:outputlink>
      

      Then I got another error message saying :
      Error loading task instance: No task instance was found with an ID of 0
      Error getting variable map: The value was given as null
      Error reading form information: The process value is null

      So I looked at the task.xhtml and found there were some conditions to load task, apply variable map and complete task .

      <j4j:loadTask id="#{id}" target="#{xtask}" navigate="false" unless="#{button == 'cancel'}"/>
      <j4j:applyVariableMap target="#{xtask}" variableMap="#{taskVariableMap}" navigate="false" unless="#{button == 'cancel'}"/>
      <j4j:completeTask task="#{xtask}" transition="#{transition}" unless="#{button != 'transition'}" navigate="false"/>
      


      So what test should I do to recognize the action link (that is not a jbpm taskform button) ?

      Thanks