-
1. Re: JBPM Change/Update Variable Value
eaa Jul 20, 2012 11:36 AM (in response to candisappear)Could you please share your process definition? Are you sure that you are mapping the output variable containing the new value in the second task into a process variable?
-
2. Re: JBPM Change/Update Variable Value
candisappear Jul 21, 2012 3:31 AM (in response to eaa)By the way I am using jbpm-jpdl-3.2.G.A. So Start State "Siparis hazirlama" has a variable musteriAdi and Task Node "Siparis onaylandi mi?" has the same variable but can't change its value.
Here is processdefinition.xml.
<?xml version="1.0" encoding="UTF-8"?>
<process-definition
xmlns="" name="Genel stok takibi">
<swimlane name="sekreter">
<assignment expression="group(sekreter)"></assignment>
</swimlane>
<swimlane name="genelmudur">
<assignment expression="group(genelmudur)"></assignment>
</swimlane>
<start-state name="Siparis hazirlama">
<task name="Siparis hazirlama" swimlane="sekreter">
<controller>
<variable name="musteriAdi" access="read,write" mapped-name="Musteri Adi"></variable>
<variable name="urunAdi" access="read,write" mapped-name="Urun Adi"></variable>
</controller>
</task>
<transition name="" to="Siparis onaylandi mi?"></transition>
</start-state>
<task-node name="Siparis onaylandi mi?">
<task name="Siparis onaylandi mi?" swimlane="genelmudur">
<controller>
<variable name="musteriAdi" access="read,write" mapped-name="Musteri Adi"></variable>
<variable name="urunAdi" access="read,write" mapped-name="Urun Adi"></variable>
</controller>
</task>
<transition name="Hayir" to="Siparis onaylanmadi"></transition>
<transition name="Evet" to="fork1"></transition>
</task-node>
<end-state name="Siparis onaylanmadi"></end-state>
<task-node name="Siparis detaylandirma">
Here is the first xhtml called Siparis-hazirlama.xhtml. This is for "Siparis hazirlama" Start State.
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<!-- the DOCTYPE means we are required to use html for a root element -->
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:tf="http://jbpm.org/jsf/tf"
xmlns:jbpm="http://jbpm.org/jsf">
<ui:component>
<jbpm:dataform>
<f:facet name="header">
<h:outputText value="#{taskName}"/>
</f:facet>
<!-- TASKFORM ROWS -->
<jbpm:datacell>
<f:facet name="header">
<h:outputText value="Musteri"/>
</f:facet>
<h:inputText value="#{var['musteriAdi']}" />
</jbpm:datacell>
<jbpm:datacell>
<f:facet name="header">
<h:outputText value="Urun Adi"/>
</f:facet>
<h:inputText value="#{var['urunAdi']}" />
</jbpm:datacell>
<jbpm:datacell>
<f:facet name="header">
<h:outputText value="Actions"/>
</f:facet>
<!-- TASKFORM BUTTONS -->
<tf:saveButton value="Save"/>
<tf:cancelButton value="Cancel"/>
<tf:transitionButton value="Save and Close"/>
</jbpm:datacell>
</jbpm:dataform>
</ui:component>
</html>
Here is the second xhtml called Siparis-onaylandi-mi.xhtml. This is for "Siparis onaylandi mi?" Task Node.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<!-- the DOCTYPE means we are required to use html for a root element -->
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:tf="http://jbpm.org/jsf/tf"
xmlns:jbpm="http://jbpm.org/jsf">
<ui:component>
<jbpm:dataform>
<f:facet name="header">
<h:outputText value="#{taskName}"/>
</f:facet>
<!-- TASKFORM ROWS -->
<jbpm:datacell>
<f:facet name="header">
<h:outputText value="Musteri"/>
</f:facet>
<h:inputText value="#{var['musteriAdi']}" />
</jbpm:datacell>
<jbpm:datacell>
<f:facet name="header">
<h:outputText value="Urun Adi"/>
</f:facet>
<h:inputText value="#{var['urunAdi']}" />
</jbpm:datacell>
<jbpm:datacell>
<f:facet name="header">
<h:outputText value="Actions"/>
</f:facet>
<!-- TASKFORM BUTTONS -->
<tf:saveButton value="Save"/>
<tf:cancelButton value="Cancel"/>
<tf:transitionButton transition="Hayir" value="Hayir"/>
<tf:transitionButton transition="Evet" value="Evet"/>
</jbpm:datacell>
</jbpm:dataform>
</ui:component>
</html>
-
3. Re: JBPM Change/Update Variable Value
candisappear Jul 26, 2012 1:55 AM (in response to candisappear)Anybody knows the answer to this question. How to change the variable value on different nodes? Variable only gets the value on the first node that it is defined, after that it is not possible to change its value.