cancel
Showing results for 
Search instead for 
Did you mean: 

deploy Advanced Workflow JBPM on Alfresco

chaabani
Champ in-the-making
Champ in-the-making
I want to deploy an advanced workflow with JBPM in Alfresco 3 is an example  ,the extensions was developed with Netbeans and processdefinition.xml and jsp with eclipse I wanted the deployed alfresco community 3.2r2 but without luck if there is a person who has an idea it would be nice of him if he shares it with me I will like to know the steps that are deployed for example knowing that I am a beginner

here is the code of the example

http://uploading.com/files/1ab17cma/projet.rar/
5 REPLIES 5

jpotts
World-Class Innovator
World-Class Innovator
Please go read this tutorial, which covers jBPM and Alfresco 3.x:
http://ecmarchitect.com/images/articles/alfresco-workflow/advanced-workflow-article.pdf

For others who need it, the second edition covers Activiti and Alfresco 4.x:
http://ecmarchitect.com/images/articles/alfresco-workflow/advanced-workflow-article-2ed.pdf

Come back to the forum if you still have unanswered questions and let us know specifically what problems you are having.

Jeff

chaabani
Champ in-the-making
Champ in-the-making
thinks Jeff for the example it's a good tutorial but I already have seen it
my problem is that I have extension developped with netbeans and
I have pages jsp and I have the process definition developped with eclipse


I don't know the steps to deploy a Advanced Workflow :

I know that I can deploy manually via console or via JBPM JPDL designer or via Ant like the example in your tutorial !!!
I don't know the steps and their order to deploy a Advanced Workflow (I'm a beginner )  ??

can I deploy all the workflow with the console like this :

deploy /alfresco/processdefinition.xml 

deploy /alfresco/model.xml

deploy /alfresco/message.properties 

and how I can deploy the extensions(class JAVA,….)    with the console

if there are another method more simple please jeff give me the steps with details because I'm a beginner

and thinks for advance     Smiley Happy

chaabani
Champ in-the-making
Champ in-the-making
more precisely
there is my processdefinition.xml

<?xml version="1.0" encoding="UTF-8"?>

<process-definition  xmlns=""  name="crwf:creditRequestProc">

   <swimlane name="directors">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <actor>#{people.getPerson("director")}</actor>
      </assignment>
   </swimlane>
   
      <swimlane name="agentsBancaires">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
  <pooledactors>#{people.getGroup("GROUP_agents_bancaires")}</pooledactors>
</assignment>
   </swimlane>
   
    <swimlane name="initiator"/>
   


   <start-state name="Demande-Credit">
      <task swimlane="initiator" name="crwf:creditRequest"></task>
      <transition to="Validation-automatique"></transition>
   </start-state>


   <task-node name="etude-credit">
      <task swimlane="agentsBancaires" name="crwf:studyCreditRequest"></task>
      <transition to="revision-credit" name="refuser"></transition>
      <transition to="preparation-offre" name="Accepter"></transition>
   </task-node>

   <task-node name="preparation-offre">
      <task swimlane="agentsBancaires" name="crwf:prepareOffer"></task>
      <transition to="reetude-offre" name="Envoyer"></transition>
   </task-node>

   <task-node name="revision-credit">
      <task swimlane="initiator" name="crwf:reviseRequest"></task>
      <transition to="FIN" name="Annuler"></transition>
      <transition to="Validation-automatique" name="Envoyer"></transition>
   </task-node>

   <task-node name="reetude-offre">
      <task swimlane="directors" name="crwf:studyOffer"></task>
      <transition to="consultation-offre" name="accepter"></transition>
      <transition to="notification-utilisateur" name="refuser"></transition>
   </task-node>

   <task-node name="consultation-offre">
      <task swimlane="initiator" name="crwf:consultOffer"></task>
      <transition to="FIN"></transition>
      <transition to="FIN" name="refuser"></transition>
      <transition to="offre-accepte" name="accepter"></transition>
   </task-node>

   <node name="notification-utilisateur">
      <transition to="FIN">
            <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
               <runas>admin</runas>
                 <script>
                       var mail = actions.create("mail");
                       mail.parameters.to = initiator.properties.email;
                       mail.parameters.subject = "Votre demande de credit";
                    mail.parameters.text ="Votre demande de credit(montant = " + crwf_creditAmount +") a ete refuse";
                       mail.execute(bpm_package);
                 </script>
         </action>
      </transition>
   </node>

   <node name="offre-accepte">
      <transition to="FIN"></transition>
   </node>

   <decision name="Validation-automatique">
   <event type="node-enter">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="wf_amount" access="write"/>
<expression>crwf_creditAmount;
</expression>
</script>
</action>
</event>
      <transition to="etude-credit" name="valider"></transition>
      <transition to="revision-credit" name="Refuser">
      <condition>#{wf_amount &gt;= 10000}</condition>
      </transition>
   </decision>


   <end-state name="FIN"></end-state>


</process-definition>
and under directory "jsp" I have 2 directories "dialogs" and "wizards":
under dialogs I have this page jsp:
"etude_credit.jsp"
<%–
* Copyright (C) 2005-2007 Alfresco Software Limited.

* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.

* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.

* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception.  You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
–%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>

<a:panel id="pooled-panel" label="#{msg.task_pooled_properties}" rendered="#{DialogManager.bean.pooledTask}"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" styleClass="mainSubTitle">

<r:propertySheetGrid id="pooled-task-props" value="#{DialogManager.bean.taskNode}" columns="1" >
<r:property id="pooled-task-owner" readOnly="true" name="owner" />
<r:association id="pooled-task-pool" readOnly="true" name="bpm:pooledActors" />
</r:propertySheetGrid>

</a:panel>

<h:outputText id="padding1" styleClass="paddingRow" value=" " escape="false" rendered="#{DialogManager.bean.pooledTask}" />

<a:panel id="metadata-panel" label="#{msg.task_properties}"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" styleClass="mainSubTitle">


                       <f:verbatim>

<table cellpadding="2" cellspacing="2" border="0" width="100%"></f:verbatim>

<f:verbatim>
<tr>
<td colspan="3" class="wizardSectionHeading">
</f:verbatim>
<h:outputText value="Détails personnels : " />
<f:verbatim>
</td>
</tr>
</f:verbatim>

<f:verbatim>
<tr>
<td></f:verbatim>
<h:outputText value="Nom : " />
<f:verbatim>
</td>
<td></f:verbatim>
<h:inputText size="30"  value="#{EtudeCreditDialog.nom}"/>
<f:verbatim>
</td>
</tr>
</f:verbatim>

<f:verbatim>
<tr>
<td></f:verbatim>
<h:outputText value="Prénom : " />
<f:verbatim>
</td>
<td></f:verbatim>
<h:inputText size="30" value="#{EtudeCreditDialog.prenom}"/>
<f:verbatim>
</td>
</tr>
</f:verbatim>

<f:verbatim>
<tr>
<td></f:verbatim>
<h:outputText value="Adresse : " />
<f:verbatim>
</td>
<td></f:verbatim>
<h:inputText size="50" value="#{EtudeCreditDialog.adresse}"/>
<f:verbatim>
</td>
</tr>
</f:verbatim>

<f:verbatim>
<tr>
<td colspan="3" class="wizardSectionHeading">
</f:verbatim>
<h:outputText value="Détails de la demande : " />
<f:verbatim>
</td>
</tr>
</f:verbatim>


<f:verbatim>
<tr>
<td></f:verbatim>
<h:outputText value="Montant : " />
<f:verbatim>
</td>
<td></f:verbatim>
<h:inputText size="20" value="#{EtudeCreditDialog.creditAmount}"/>
<f:verbatim>
</td>
</tr>
</f:verbatim>

<f:verbatim>
<tr>
<td></f:verbatim>
<h:outputText value="Dépenses " />
<f:verbatim>
</td>
<td></f:verbatim>
<h:dataTable value="#{EtudeCreditDialog.depenses}"  var="depense" rowClasses="selectedItemsRow,selectedItemsRowAlt"
styleClass="selectedItems" headerClass="selectedItemsHeader" width="80%"
cellspacing="0" cellpadding="4" binding="#{EtudeCreditDialog.dataTable}">
    <h:column>
      <f:facet name="header">
      <h:outputText value="Description" />
      </f:facet>
     <h:outputText value="#{depense.description}" />
     <f:attribute name="width" value="200" />
     
    </h:column>
   
    <h:column>
      <f:facet name="header">
      <h:outputText value="Montant" />
      </f:facet>
     <h:outputText value="#{depense.montant}" />
    
    </h:column>
   
   <h:column>
      <f:facet name="header">
      <h:outputText value="Fréquence" />
      </f:facet>
     <h:outputText value="#{depense.frequence}" />
    
    </h:column>
   
  </h:dataTable>
<f:verbatim>
</td>
</tr></f:verbatim>


<f:verbatim></table>
</f:verbatim>
</a:panel>

<h:outputText id="padding2" styleClass="paddingRow" value=" " escape="false" />

<a:panel id="resources-panel" label="#{msg.resources}"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" styleClass="mainSubTitle">

<h:outputText value="#{msg.no_resources}" rendered="#{empty DialogManager.bean.resources}" />

<a:richList id="resources-list" viewMode="details" value="#{DialogManager.bean.resources}" var="r"
binding="#{DialogManager.bean.packageItemsRichList}"
styleClass="recordSet" headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow"
altRowStyleClass="recordSetRowAlt" width="100%" pageSize="10"
initialSortColumn="name" initialSortDescending="true"
rendered="#{not empty DialogManager.bean.resources}">

<%– Name column –%>
<a:column id="col1" primary="true" width="200" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col1-sort" label="#{msg.name}" value="name" mode="case-insensitive" styleClass="header"/>
</f:facet>
<f:facet name="small-icon">
<a:actionLink id="col1-act1" value="#{r.name}" href="#{r.url}" target="new" image="#{r.fileType16}"
showLink="false" styleClass="inlineAction" />
</f:facet>
<a:actionLink id="col1-act2" value="#{r.name}" href="#{r.url}" target="new" />
<r:lockIcon id="col1-lock" value="#{r.nodeRef}" align="absmiddle" />
</a:column>

<%– Description column –%>
<a:column id="col2" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col2-sort" label="#{msg.description}" value="description" styleClass="header"/>
</f:facet>
<h:outputText id="col2-txt" value="#{r.description}" />
</a:column>

<%– Path column –%>
<a:column id="col3" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col3-sort" label="#{msg.path}" value="path" styleClass="header"/>
</f:facet>
<r:nodePath id="col3-path" value="#{r.path}" action="dialog:close:browse"
actionListener="#{BrowseBean.clickSpacePath}" />
</a:column>

<%– Created Date column –%>
<a:column id="col4" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col4-sort" label="#{msg.created}" value="created" styleClass="header"/>
</f:facet>
<h:outputText id="col4-txt" value="#{r.created}">
<a:convertXMLDate type="both" pattern="#{msg.date_time_pattern}" />
</h:outputText>
</a:column>

<%– Modified Date column –%>
<a:column id="col5" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col5-sort" label="#{msg.modified}" value="modified" styleClass="header"/>
</f:facet>
<h:outputText id="col5-txt" value="#{r.modified}">
<a:convertXMLDate type="both" pattern="#{msg.date_time_pattern}" />
</h:outputText>
</a:column>

<%– Actions column –%>
<a:column id="col6" actions="true" style="padding:2px;text-align:left">
<f:facet name="header">
<h:outputText id="col6-txt" value="#{msg.actions}"/>
</f:facet>
<r:actions id="col6-actions" value="#{DialogManager.bean.packageItemActionGroup}"
context="#{r}" showLink="false" styleClass="inlineAction" />
</a:column>
<a:dataPager styleClass="pager" id="pager1" />
</a:richList>

<h:panelGrid id="package-actions-group" columns="1" styleClass="paddingRow">
<r:actions id="package-actions" context="#{DialogManager.bean.taskNode}"
value="#{DialogManager.bean.packageActionGroup}" />
</h:panelGrid>

<h:panelGrid id="add-item-control" columns="1" rendered="#{DialogManager.bean.itemBeingAdded}"
styleClass="selector" style="margin-top: 6px;">
<r:contentSelector id="content-picker" value="#{DialogManager.bean.itemsToAdd}" styleClass="" />
<h:panelGrid columns="2">
<h:commandButton value="#{msg.add_to_list_button}" actionListener="#{DialogManager.bean.addPackageItems}" />
<h:commandButton value="#{msg.cancel}" actionListener="#{DialogManager.bean.cancelAddPackageItems}" />
</h:panelGrid>
</h:panelGrid>

</a:panel>

<h:outputText id="padding3" styleClass="paddingRow" value=" " escape="false" />

<a:panel id="workflow-summary-panel" label="#{msg.part_of_workflow}"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" styleClass="mainSubTitle">

<r:workflowSummary id="workflow-summary" value="#{DialogManager.bean.workflowInstance}" styleClass="workflowSummary" />

<f:verbatim><div style="padding-left:9px;padding-top:8px;padding-bottom:4px"></f:verbatim>
<a:panel id="pending-submission-panel" label="#{msg.workflow_history}" progressive="true"
expanded="true" styleClass="mainSubTitle">
<r:workflowHistory id="workflow-history" value="#{DialogManager.bean.workflowInstance}" styleClass="workflowHistoryList" />
</a:panel>
<f:verbatim></div></f:verbatim>
</a:panel>

<h:outputText id="padding4" styleClass="paddingRow" value=" " escape="false" />

<a:panel rendered="false" id="workflow-outline" label="#{msg.workflow_outline}" progressive="true" expanded="false"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" styleClass="mainSubTitle">

<h:graphicImage value="#{DialogManager.bean.workflowDefinitionImageUrl}"/>

</a:panel>
and under directory "wizards" I have this pages jsps:
"credit_infos.jsp"
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
                             
                       <f:verbatim>

<table cellpadding="2" cellspacing="2" border="0" width="100%"></f:verbatim>

<f:verbatim>
<tr>
<td colspan="3" class="wizardSectionHeading">
</f:verbatim>
<h:outputText value="Détails de la demande : " />
<f:verbatim>
</td>
</tr>
</f:verbatim>


<f:verbatim>
<tr>
<td></f:verbatim>
<h:outputText value="Montant : " />
<f:verbatim>
</td>
<td></f:verbatim>
<h:inputText size="20" binding="#{WizardManager.bean.creditAmount}"/>
<f:verbatim>
</td>
</tr>
</f:verbatim>



<f:verbatim></table>
</f:verbatim>
"expenses_infos.jsp"
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
                             
                       <f:verbatim>

<table cellpadding="2" cellspacing="2" border="0" width="100%"></f:verbatim>


<f:verbatim>
<tr>
<td></f:verbatim>
<h:outputText value="Dépenses " />
<f:verbatim>
</td>
<td></f:verbatim>
<h:dataTable value="#{WizardManager.bean.depenses}"  var="depense" rowClasses="selectedItemsRow,selectedItemsRowAlt"
styleClass="selectedItems" headerClass="selectedItemsHeader" width="80%"
cellspacing="0" cellpadding="4" binding="#{WizardManager.bean.dataTable}">
    <h:column>
      <f:facet name="header">
      <h:outputText value="Description" />
      </f:facet>
     <h:outputText value="#{depense.description}" />
     <f:attribute name="width" value="200" />
     
    </h:column>
   
    <h:column>
      <f:facet name="header">
      <h:outputText value="Montant" />
      </f:facet>
     <h:outputText value="#{depense.montant}" />
    
    </h:column>
   
   <h:column>
      <f:facet name="header">
      <h:outputText value="Fréquence" />
      </f:facet>
     <h:outputText value="#{depense.frequence}" />
    
    </h:column>
   
    <h:column> 
<h:commandButton value="Supprimer" action="#{WizardManager.bean.removeDepense}" /> 
</h:column> 
  </h:dataTable>
<f:verbatim>
</td>
</tr></f:verbatim>

<f:verbatim>
<tr>
<td></f:verbatim>
<h:outputText value="Description : " />
<f:verbatim>
</td>
<td></f:verbatim>
<h:inputTextarea  rows="4" cols="30" binding="#{WizardManager.bean.description}"/>
<f:verbatim>
</td>
</tr>
</f:verbatim>

<f:verbatim>
<tr>
<td></f:verbatim>
<h:outputText value="Montant : " />
<f:verbatim>
</td>
<td></f:verbatim>
<h:inputText size="20" binding="#{WizardManager.bean.amount}"/>
<f:verbatim>
</td>
</tr>
</f:verbatim>

<f:verbatim>
<tr>
<td></f:verbatim>
<h:outputText value="Fréquence : " />
<f:verbatim>
</td>
<td></f:verbatim>
<h:inputText size="20" binding="#{WizardManager.bean.frequency}"/>
<f:verbatim>
</td>
</tr>
</f:verbatim>

<f:verbatim>
<tr>
<td></f:verbatim>
<h:outputText value=" " />
<f:verbatim>
</td>
<td></f:verbatim>
<h:commandButton value="Ajouter" action="#{WizardManager.bean.addDepense}" /> 
<f:verbatim>
</td>
</tr>
</f:verbatim>



<f:verbatim></table>
</f:verbatim>
"user_infos.jsp":
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
                             
                       <f:verbatim>

<table cellpadding="2" cellspacing="2" border="0" width="100%"></f:verbatim>

<f:verbatim>
<tr>
<td colspan="3" class="wizardSectionHeading">
</f:verbatim>
<h:outputText value="Détails personnels : " />
<f:verbatim>
</td>
</tr>
</f:verbatim>

<f:verbatim>
<tr>
<td></f:verbatim>
<h:outputText value="Nom : " />
<f:verbatim>
</td>
<td></f:verbatim>
<h:inputText size="30" binding="#{WizardManager.bean.nom}"/>
<f:verbatim>
</td>
</tr>
</f:verbatim>

<f:verbatim>
<tr>
<td></f:verbatim>
<h:outputText value="Prénom : " />
<f:verbatim>
</td>
<td></f:verbatim>
<h:inputText size="30" binding="#{WizardManager.bean.prenom}"/>
<f:verbatim>
</td>
</tr>
</f:verbatim>

<f:verbatim>
<tr>
<td></f:verbatim>
<h:outputText value="Adresse : " />
<f:verbatim>
</td>
<td></f:verbatim>
<h:inputText size="50" binding="#{WizardManager.bean.adresse}"/>
<f:verbatim>
</td>
</tr>
</f:verbatim>

<f:verbatim></table>
</f:verbatim>
and in the projects netbeans where I developped my extension I have 4 directories :
"alfresco"  and "alfresco.extension" and "ma" and "META-INF"

under "META-INF" I have thise files xml :
"web-client-config-custom.xml"
<alfresco-config>

    <config>
        <wizards>
            <!– Definition of the Interview Setup wizard –>
            <wizard name="creditRequest" managed-bean="CreditRequestWizard"
                    title="Demande de credit" descriptionid="Assistant de creation demande de credit"
                    icon="/alfresco/images/icons/workflow_task.gif">
                <step name="userDetails" title="Informations personnels"
                      description="Permet de saisir vos details personnel">
                    <page path="/jsp/extension/wizards/creditRequest/user_infos.jsp"
                          title="Informations personnel"
                          description="Vos informations personnels"
                          instruction-id="default_instruction" />
                </step>
                <step name="creditDetails" title="Details du credit"
                      description="Informations sur le credit demande">
                    <page path="/jsp/extension/wizards/creditRequest/credit_infos.jsp"
                          title="Details du credit"
                          description="Informations sur le credit"
                          instruction-id="default_instruction" />
                </step>
                <step name="expensesDetails" title="Vos dépenses"
                      description="vos depenses personnels">
                    <page path="/jsp/extension/wizards/creditRequest/expenses_infos.jsp"
                          title="Vos dépenses"
                          description="vos depenses personnelsc"
                          instruction-id="default_instruction" />
                </step>
                <step name="summary" title-id="summary" descriptionid="summary_step_description">
                    <page path="/jsp/wizard/summary.jsp"
                          title-id="summary"
                          description-id="summary_desc"
                          instruction-id="default_instruction" />
                </step>
            </wizard>
        </wizards>
    </config>

    <config>
        <actions>
           


            <!– Actions Menu for Space Details screen –>
            <action-group id="browse_actions_menu">
                <action idref="credit_request" />
            </action-group>

           

            <!– Assistant de demande de credit –>
            <action id="credit_request">
                <label>Demande de credit</label>
                <image>/someco/images/icons/interview_setup.gif</image>
                <action>wizard:creditRequest</action>
                <action-listener>#{BrowseBean.setupSpaceAction}</action-listener>
                <params>
                    <param name="id">#{actionContext.id}</param>
                </params>
            </action>
        </actions>
    </config>

    <config evaluator="node-type" condition="crwf:studyCreditRequest" replace="true">

   <dialogs>
      <dialog name="manageTask"
              page="/jsp/extension/dialogs/creditRequest/etude_credit.jsp"
              managed-bean="EtudeCreditDialog"
              icon="/images/icons/manage_workflow_task_large.gif"
              description-id="manage_task_desc" />
   </dialogs>

</config>



<config evaluator="node-type" condition="crwf:consultOffer">

        <property-sheet>
         <separator name="sep1" display-label="Détails de l'offre" component-generator="HeaderSeparatorGenerator" />
         <show-property display-label="Montant accepté"  name="crwf:ApprovedAmount" component-generator="TextFieldGenerator" read-only="true"/>
                        <show-property display-label="Taux" name="crwf:creditRate" component-generator="TextFieldGenerator" read-only="true"/>
                        <show-property display-label="Période" name="crwf:creditPeriode" component-generator="TextFieldGenerator" read-only="true"/>


      </property-sheet>

</config>

<config evaluator="node-type" condition="crwf:prepareOffer">

        <property-sheet>

                    <separator name="sep2" display-label="Détails de la demande" component-generator="HeaderSeparatorGenerator" />
         <show-property display-label="Nom"  name="crwf:firstName" component-generator="TextFieldGenerator" read-only="true"/>
                        <show-property display-label="Taux" name="crwf:lastName" component-generator="TextFieldGenerator" read-only="true"/>
                        <show-property display-label="Montant demandé" name="crwf:creditAmount" component-generator="TextFieldGenerator" read-only="true"/>


         <separator name="sep1" display-label="Détails de l'offre" component-generator="HeaderSeparatorGenerator" />
         <show-property display-label="Montant accepté"  name="crwf:ApprovedAmount" component-generator="TextFieldGenerator" />
                        <show-property display-label="Taux" name="crwf:creditRate" component-generator="TextFieldGenerator" />
                        <show-property display-label="Période" name="crwf:creditPeriode" component-generator="TextFieldGenerator" />


      </property-sheet>

</config>

<config evaluator="node-type" condition="crwf:studyOffer">

        <property-sheet>

                    <separator name="sep2" display-label="Détails de la demande" component-generator="HeaderSeparatorGenerator" />
         <show-property display-label="Nom"  name="crwf:firstName" component-generator="TextFieldGenerator" read-only="true"/>
                        <show-property display-label="Prénom" name="crwf:lastName" component-generator="TextFieldGenerator" read-only="true"/>
                        <show-property display-label="Montant demandé" name="crwf:creditAmount" component-generator="TextFieldGenerator" read-only="true"/>


         <separator name="sep1" display-label="Détails de l'offre" component-generator="HeaderSeparatorGenerator" read-only="true"/>
         <show-property display-label="Montant accepté"  name="crwf:ApprovedAmount" component-generator="TextFieldGenerator" read-only="true"/>
                        <show-property display-label="Taux" name="crwf:creditRate" component-generator="TextFieldGenerator" read-only="true"/>
                        <show-property display-label="Période" name="crwf:creditPeriode" component-generator="TextFieldGenerator" read-only="true"/>


      </property-sheet>

</config>

<config evaluator="node-type" condition="crwf:reviseRequest">

        <property-sheet>

                    <separator name="sep2" display-label="Informations personnels" component-generator="HeaderSeparatorGenerator" />
         <show-property display-label="Nom"  name="crwf:firstName" component-generator="TextFieldGenerator" />
                        <show-property display-label="Prénom" name="crwf:lastName" component-generator="TextFieldGenerator" />
                        <show-property display-label="Adresse" name="crwf:adresse" component-generator="TextFieldGenerator" />


         <separator name="sep1" display-label="Détails de demande" component-generator="HeaderSeparatorGenerator" read-only="true"/>
         <show-property display-label="Montant demandé"  name="crwf:creditAmount" component-generator="TextFieldGenerator" />

      </property-sheet>

</config>
</alfresco-config>
"persistence.xml"
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  <persistence-unit name="CreditRequestPU" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <class>ma.ensias.dao.Credit</class>
    <class>ma.ensias.dao.Depense</class>
    <class>ma.ensias.dao.Offre</class>
    <properties>
      <property name="eclipselink.jdbc.password" value=""/>
      <property name="eclipselink.jdbc.user" value="root"/>
      <property name="eclipselink.jdbc.driver" value="com.mysql.jdbc.Driver"/>
      <property name="eclipselink.jdbc.url" value="jdbc:mysql://localhost:3306/ensias"/>
    </properties>
  </persistence-unit>
</persistence>
"faces-config.xml"
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
                              "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>


 

 

  

  <managed-bean>
<managed-bean-name>CreditRequestWizard</managed-bean-name>
<managed-bean-class>ma.ensias.alfresco.wizards.CreditRequestWizard</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>nodeService</property-name>
<value>#{NodeService}</value>
</managed-property>
<managed-property>
<property-name>browseBean</property-name>
<value>#{BrowseBean}</value>
</managed-property>
<managed-property>
<property-name>workflowService</property-name>
<value>#{WorkflowService}</value>
</managed-property>
</managed-bean>

<managed-bean>
      <description>
         The bean that backs up the Manage Task Dialog
      </description>
      <managed-bean-name>EtudeCreditDialog</managed-bean-name>
      <managed-bean-class>ma.ensias.alfresco.dialogs.EtudeCreditDialog</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      <managed-property>
         <property-name>nodeService</property-name>
         <value>#{NodeService}</value>
      </managed-property>
      <managed-property>
         <property-name>fileFolderService</property-name>
         <value>#{FileFolderService}</value>
      </managed-property>
      <managed-property>
         <property-name>searchService</property-name>
         <value>#{SearchService}</value>
      </managed-property>
      <managed-property>
         <property-name>navigator</property-name>
         <value>#{NavigationBean}</value>
      </managed-property>
      <managed-property>
         <property-name>browseBean</property-name>
         <value>#{BrowseBean}</value>
      </managed-property>
      <managed-property>
         <property-name>dictionaryService</property-name>
         <value>#{DictionaryService}</value>
      </managed-property>
      <managed-property>
         <property-name>namespaceService</property-name>
         <value>#{NamespaceService}</value>
      </managed-property>
      <managed-property>
         <property-name>workflowService</property-name>
         <value>#{WorkflowService}</value>
      </managed-property>
      <managed-property>
         <property-name>avmService</property-name>
         <value>#{AVMLockingAwareService}</value>
      </managed-property>
      <managed-property>
         <property-name>avmSyncService</property-name>
         <value>#{AVMSyncService}</value>
      </managed-property>
   </managed-bean>
  
</faces-config>
and under the directory "alfresco.extension" I have three files:
"creditRequest-model-context.xml" and "creditRequestWFModel.properties" and "creditRequestWFModel.xml"

"creditRequest-model-context.xml":
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
   
   

<bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/creditRequestWFModel.xml</value>
            </list>
        </property>
    </bean>

   <!– Registration of resource bundles –>
    <bean id="extension.workflowBootstrap"
          parent="workflowDeployer">
        <property name="workflowDefinitions">
         <list>
            <props>
               <prop key="engineId">jbpm</prop>
               <prop key="location">alfresco/extension/workflows/creditRequest/processdefinition.xml</prop>
               <prop key="mimetype">text/xml</prop>
               <prop key="redeploy">true</prop>
            </props>
         </list>
      </property>
        <property name="labels">
                <list>
                <value>alfresco.extension.creditRequestWFModel</value>
            </list>
        </property>
    </bean>


   
</beans>
"creditRequestWFModel.properties":
#
#   Credit Request workflow properties
#

crwf_creditRequestProc.workflow.title=Demande de credit
crwf_creditRequestProc.workflow.description=Demande de credit

crwf_creditRequestWorkflow.type.crwf_creditRequest.title=demande de cr\u00E9dit
crwf_creditRequestWorkflow.type.crwf_creditRequest.description=Demande de cr\u00E9dit

crwf_creditRequestWorkflow.type.crwf_studyCreditRequest.title=Etude de demande de cr\u00E9dit
crwf_creditRequestWorkflow.type.crwf_studyCreditRequest.description=Etude de demande de cr\u00E9dit

crwf_creditRequestWorkflow.type.crwf_reviseRequest.title=Modification du demande
crwf_creditRequestWorkflow.type.crwf_reviseRequest.description=Modification du demande

crwf_creditRequestWorkflow.type.crwf_prepareOffer.title=Pr\u00E9paration d'offre
crwf_creditRequestWorkflow.type.crwf_prepareOffer.description=Pr\u00E9paration d'offre de cr\u00E9dit

crwf_creditRequestWorkflow.type.crwf_studyOffer.title=Etude d'offre de cr\u00E9dit
crwf_creditRequestWorkflow.type.crwf_studyOffer.description=Etude d'offre de cr\u00E9dit

crwf_creditRequestWorkflow.type.crwf_consultOffer.title=Offre de cr\u00E9dit
crwf_creditRequestWorkflow.type.crwf_consultOffer.description=Consulter l'offre de cr\u00E9dit

"creditRequestWFModel.xml"
<?xml version="1.0" encoding="UTF-8"?>
<!– definition of the workflow model for document validation process –>
<model name="crwf:creditRequestWorkflow" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <description> Credit Request Workflow Model </description>
   <author>Haltout Sohaib</author>
   <version>1.0</version>

   <imports>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
      <import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm" />
   </imports>

   <namespaces>
      <namespace uri="http://www.ensias.ma/model/cr/1.0" prefix="crwf" />
   </namespaces>

   <types>
      <!– The submit request Task model –>
      <type name="crwf:creditRequest" >
         <parent>bpm:startTask</parent>
                        <properties>
            <property name="crwf:firstName" >
               <type>d:text</type>
            </property>

            <property name="crwf:lastName" >
               <type>d:text</type>
            </property>

                                <property name="crwf:adresse" >
               <type>d:text</type>
            </property>

                                <property name="crwf:creditAmount" >
               <type>d:float</type>
            </property>

                                <property name="crwf:requestNumber" >
               <type>d:int</type>
            </property>
         </properties>
                
      </type>

      <!– The review request Task model –>
      <type name="crwf:studyCreditRequest">
         <parent>crwf:creditRequest</parent>
                        <properties>
                        <property name="crwf:rejectionReason" >
               <type>d:text</type>
         </property>
                        </properties>

      </type>

                <type name="crwf:reviseRequest">
         <parent>crwf:studyCreditRequest</parent>
      </type>

                <type name="crwf:prepareOffer">
         <parent>crwf:creditRequest</parent>
                        <properties>
                        <property name="crwf:ApprovedAmount" >
               <type>d:float</type>
         </property>
                        <property name="crwf:creditRate" >
               <type>d:float</type>
         </property>
                        <property name="crwf:creditPeriode" >
               <type>d:text</type>
         </property>
                        </properties>

      </type>


                <type name="crwf:studyOffer">
         <parent>crwf:prepareOffer</parent>
      </type>

                <type name="crwf:consultOffer">
         <parent>crwf:prepareOffer</parent>
      </type>

   </types>

</model>
and the directory "ma" contain the directory "ensias" ,that contain another directorie :
"dao" :contain three entities "Credit" and "Depense" and "offre"
"alfresco " contains wizards and dialogs and two another class java "CreditRequestContentModel.java" and "CreditRequestManageTask.java"




please how can I deploy this projects !!!
If some one knows how please guve me the steps in details because I 'm a beginner Smiley Happy

jpotts
World-Class Innovator
World-Class Innovator
The Eclipse/Netbeans issue doesn't matter. You can create Java code and extensions in any tool. It sounds like you need to know where to put things.

Try this. Use this svn command to checkout some sample code from the Alfresco Developer Guide:
svn co http://alfresco-developer-guide.googlecode.com/svn/tags/ch7_3.4_enterprise/client-extensions/ .

And look at how the files are organized. Look at the Ant build.xml script to see how the ZIP is built. The ZIP includes all Java source, workflows, Explorer JSP files, META-INF files, etc.

You might also want to review this wiki page on packaging and deploying extensions.

The workflow console's "deploy" command is only used to deploy workflows to the workflow engine. It cannot be used to deploy anything else.

So look at the project structure and the Ant build script and you should be able to figure out where your files go.

Jeff

chaabani
Champ in-the-making
Champ in-the-making
that is right Jeff this is my problem I don't know where to put things I will try your method but meanwhile I have anaother problem with your
example I  downloaded it and I use the ant build It build the project successful but
I want to start the workflow that you have created with JBPM/Alfresco  I don't know how I start the workflow
I wander if I should create some user with specific name to the role of the workflow defined in the process definition !!!
and I don't know I can start the workflow from :
alfresco
http://localhost:8080/alfresco/faces/jsp/dialog/container.jsp
or from share :
http://localhost:8080/share/page/user/admin/dashboard


If you have the steps of starting the workflow I need it to better understand your example