CMDBuild Forum

Utilizzo di variabili lookup nel workflow

Salve,

 

potreste indiarmi come utilizzare le variabili di lookup in un workflow, in particolare come indirizzare la scelta attraverso una lookup table per scegliere quale attività eseguire.

vi allego un esempio che ho prodotto che permette di scegliere il produttore e in base alla scelta non gestisce il corretto perrcorso.

Con la 0.9 la soluzione era molto più semplificata e funzionante.

XPDL del processo di esempio:

 

 

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://www.wfmc.org/2002/XPDL1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="Package_servicedesk" Name="Package_servicedesk" xsi:schemaLocation="http://www.wfmc.org/2002/XPDL1.0 http://wfmc.org/standards/docs/TC-1025_schema_10_xpdl.xsd">
<PackageHeader>
<XPDLVersion>1.0</XPDLVersion>
<Vendor>Togheter</Vendor>
<Created>2009-11-10 11:41:07</Created>
</PackageHeader>
<Script Type="text/java"/>
<TypeDeclarations>
<TypeDeclaration Id="Lookup" Name="Lookup">
<ExternalReference location="org.cmdbuild.workflow.type.LookupType"/>
</TypeDeclaration>
<TypeDeclaration Id="Reference" Name="Reference">
<ExternalReference location="org.cmdbuild.workflow.type.ReferenceType"/>
</TypeDeclaration>
<TypeDeclaration Id="Lookups" Name="Lookups">
<ExternalReference location="org.cmdbuild.workflow.type.LookupType&lt;&gt;"/>
</TypeDeclaration>
<TypeDeclaration Id="References" Name="References">
<ExternalReference location="org.cmdbuild.workflow.type.ReferenceType&lt;&gt;"/>
</TypeDeclaration>
</TypeDeclarations>
<WorkflowProcesses>
<WorkflowProcess Id="Process_servicedesk" Name="Process_servicedesk">
<ProcessHeader>
<Created>2009-11-10 11:41:07</Created>
</ProcessHeader>
<DataFields>
<DataField Id="ProcessId" IsArray="FALSE" Name="ProcessId">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</DataField>
<DataField Id="ProcessClass" IsArray="FALSE" Name="ProcessClass">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</DataField>
<DataField Id="ProcessCode" IsArray="FALSE" Name="ProcessCode">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</DataField>
<DataField Id="ActivityDescription" IsArray="FALSE" Name="ActivityDescription">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</DataField>
<DataField Id="Code" IsArray="FALSE" Name="Code">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</DataField>
<DataField Id="Description" IsArray="FALSE" Name="Description">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</DataField>
<DataField Id="FlowStatus" IsArray="FALSE" Name="FlowStatus">
<DataType>
<DeclaredType Id="Lookup"/>
</DataType>
</DataField>
<DataField Id="Notes" IsArray="FALSE" Name="Notes">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</DataField>
<DataField Id="Priority" IsArray="FALSE" Name="Priority">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</DataField>
<DataField Id="Produttore" IsArray="FALSE" Name="Produttore">
<DataType>
<DeclaredType Id="Lookup"/>
</DataType>
</DataField>
<DataField Id="Utente" IsArray="FALSE" Name="Utente">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</DataField>
<DataField Id="data" IsArray="FALSE" Name="data">
<DataType>
<BasicType Type="DATETIME"/>
</DataType>
</DataField>
<DataField Id="ticket" IsArray="FALSE" Name="ticket">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</DataField>
<DataField Id="body" IsArray="FALSE" Name="body">
<DataType>
<BasicType Type="STRING"/>
</DataType>
<Length>200</Length>
</DataField>
<DataField Id="tickets" IsArray="FALSE" Name="tickets">
<DataType>
<BasicType Type="STRING"/>
</DataType>
<Length>20</Length>
</DataField>
<DataField Id="datas" IsArray="FALSE" Name="datas">
<DataType>
<BasicType Type="STRING"/>
</DataType>
<Length>20</Length>
</DataField>
<DataField Id="LookUpDescriptionS" IsArray="FALSE" Name="LookUpDescriptionS">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</DataField>
<DataField Id="ProduttoreS" IsArray="FALSE" Name="ProduttoreS">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</DataField>
</DataFields>
<Participants>
<Participant Id="System" Name="System">
<ParticipantType Type="SYSTEM"/>
</Participant>
<Participant Id="SuperUser" Name="SuperUser">
<ParticipantType Type="ROLE"/>
</Participant>
</Participants>
<Applications>
<Application Id="boolCopy" Name="boolCopy">
<Description>copy a boolean into another</Description>
<FormalParameters>
<FormalParameter Id="From" Index="From" Mode="IN">
<DataType>
<BasicType Type="BOOLEAN"/>
</DataType>
</FormalParameter>
<FormalParameter Id="To" Index="To" Mode="OUT">
<DataType>
<BasicType Type="BOOLEAN"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="To = new java.lang.Boolean(From.booleanValue());"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="boolToString" Name="boolToString">
<Description>convert a Bool to a String</Description>
<FormalParameters>
<FormalParameter Id="InputBool" Index="InputBool" Mode="IN">
<DataType>
<BasicType Type="BOOLEAN"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputString" Index="OutputString" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="OutputString = String.valueOf(InputBool);"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="clearLookup" Name="clearLookup">
<Description>clear a lookup object (set id = -1)</Description>
<FormalParameters>
<FormalParameter Id="Lookup" Index="Lookup" Mode="IN">
<DataType>
<DeclaredType Id="Lookup"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="Lookup.id = -1"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="clearReference" Name="clearReference">
<Description>clear a reference object (set id = -1)</Description>
<FormalParameters>
<FormalParameter Id="Ref" Index="Ref" Mode="IN">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="Ref.id = -1"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="concat" Name="concat">
<Description>concatenate 2 strings</Description>
<FormalParameters>
<FormalParameter Id="InputString1" Index="InputString1" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString2" Index="InputString2" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputString" Index="OutputString" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="OutputString = InputString1.concat(InputString2);"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="concat3" Name="concat3">
<Description>concatenate 3 strings</Description>
<FormalParameters>
<FormalParameter Id="InputString1" Index="InputString1" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString2" Index="InputString2" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString3" Index="InputString3" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputString" Index="OutputString" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="OutputString = InputString1.concat(InputString2).concat(InputString3);"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="concat4" Name="concat4">
<Description>concatenate 4 strings</Description>
<FormalParameters>
<FormalParameter Id="InputString1" Index="InputString1" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString2" Index="InputString2" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString3" Index="InputString3" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString4" Index="InputString4" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputString" Index="OutputString" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="OutputString = InputString1.concat(InputString2).concat(InputString3).concat(InputString4);"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="concat5" Name="concat5">
<Description>concatenate 5 strings</Description>
<FormalParameters>
<FormalParameter Id="InputString1" Index="InputString1" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString2" Index="InputString2" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString3" Index="InputString3" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString4" Index="InputString4" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString5" Index="InputString5" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputString" Index="OutputString" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="OutputString = InputString1.concat(InputString2).concat(InputString3).concat(InputString4).concat(InputString5);"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="concat6" Name="concat6">
<Description>concatenate 6 strings</Description>
<FormalParameters>
<FormalParameter Id="InputString1" Index="InputString1" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString2" Index="InputString2" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString3" Index="InputString3" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString4" Index="InputString4" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString5" Index="InputString5" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString6" Index="InputString6" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputString" Index="OutputString" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="OutputString = InputString1.concat(InputString2).concat(InputString3).concat(InputString4).concat(InputString5).concat(InputString6);"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="concat7" Name="concat7">
<Description>concatenate 7 strings</Description>
<FormalParameters>
<FormalParameter Id="InputString1" Index="InputString1" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString2" Index="InputString2" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString3" Index="InputString3" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString4" Index="InputString4" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString5" Index="InputString5" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString6" Index="InputString6" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString7" Index="InputString7" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputString" Index="OutputString" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="OutputString = InputString1.concat(InputString2).concat(InputString3).concat(InputString4).concat(InputString5).concat(InputString6).concat(InputString7);"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="concat8" Name="concat8">
<Description>concatenate 8 strings</Description>
<FormalParameters>
<FormalParameter Id="InputString1" Index="InputString1" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString2" Index="InputString2" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString3" Index="InputString3" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString4" Index="InputString4" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString5" Index="InputString5" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString6" Index="InputString6" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString7" Index="InputString7" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="InputString8" Index="InputString8" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputString" Index="OutputString" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="OutputString = InputString1.concat(InputString2).concat(InputString3).concat(InputString4).concat(InputString5).concat(InputString6).concat(InputString7).concat(InputString8);"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="createCard" Name="createCard">
<Description>create a card</Description>
<FormalParameters>
<FormalParameter Id="ClassName" Index="ClassName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="CardCode" Index="CardCode" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="CardDescription" Index="CardDescription" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="CardId" Index="CardId" Mode="OUT">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.CreateCardToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="createCardRef" Name="createCardRef">
<Description>create a card and get the reference</Description>
<FormalParameters>
<FormalParameter Id="ClassName" Index="ClassName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="CardCode" Index="CardCode" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="CardDescription" Index="CardDescription" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="CardReference" Index="CardReference" Mode="OUT">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.CreateCardToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="createReferenceObj" Name="createReferenceObj">
<Description>create a reference object from classname, objid and description</Description>
<FormalParameters>
<FormalParameter Id="ClassName" Index="ClassName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ObjId" Index="ObjId" Mode="IN">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Description" Index="Description" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutRef" Index="OutRef" Mode="OUT">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="tmp = org.cmdbuild.shark.util.CmdbuildUtils.getInstance().getStructureFromName( ClassName ).getId(); OutRef = new org.cmdbuild.workflow.type.ReferenceType( ObjId.intValue(),tmp,Description );"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="createRelation" Name="createRelation">
<Description>create a relation</Description>
<FormalParameters>
<FormalParameter Id="DomainName" Index="DomainName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ClassName1" Index="ClassName1" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ClassName2" Index="ClassName2" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ObjId1" Index="ObjId1" Mode="IN">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ObjId2" Index="ObjId2" Mode="IN">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Done" Index="Done" Mode="OUT">
<DataType>
<BasicType Type="BOOLEAN"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.CreateRelationToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="createRelation1Ref" Name="createRelation1Ref">
<Description>create relation between 2 cards, the first use a reference variable</Description>
<FormalParameters>
<FormalParameter Id="DomainName" Index="DomainName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ObjReference1" Index="ObjReference1" Mode="IN">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ClassName2" Index="ClassName2" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ObjId2" Index="ObjId2" Mode="IN">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Done" Index="Done" Mode="OUT">
<DataType>
<BasicType Type="BOOLEAN"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.CreateRelationToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="createRelation2Ref" Name="createRelation2Ref">
<Description>create relation between 2 cards, the second use a reference variable</Description>
<FormalParameters>
<FormalParameter Id="DomainName" Index="DomainName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ClassName1" Index="ClassName1" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ObjId1" Index="ObjId1" Mode="IN">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ObjReference2" Index="ObjReference2" Mode="IN">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Done" Index="Done" Mode="OUT">
<DataType>
<BasicType Type="BOOLEAN"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.CreateRelationToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="createRelationRefs" Name="createRelationRefs">
<Description>create a relation between two references</Description>
<FormalParameters>
<FormalParameter Id="DomainName" Index="DomainName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ObjReference1" Index="ObjReference1" Mode="IN">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ObjReference2" Index="ObjReference2" Mode="IN">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Done" Index="Done" Mode="OUT">
<DataType>
<BasicType Type="BOOLEAN"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.CreateRelationToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="dateToString" Name="dateToString">
<Description>convert a Date to a String</Description>
<FormalParameters>
<FormalParameter Id="InputDate" Index="InputDate" Mode="IN">
<DataType>
<BasicType Type="DATETIME"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputString" Index="OutputString" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="OutputString = &quot;&quot;;if(InputDate!=null){OutputString = new java.text.SimpleDateFormat(&quot;yyyy-MM-dd'T'HH:mm:ss&quot;).format(InputDate.getTime());}else{System.out.println(&quot;null date: &quot; + InputDate);}"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="externalSync" Name="externalSync">
<FormalParameters>
<FormalParameter Id="XMLString" Index="XMLString" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Out" Index="Out" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.ExternalSyncToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="floatCopy" Name="floatCopy">
<Description>copy a float into another</Description>
<FormalParameters>
<FormalParameter Id="From" Index="From" Mode="IN">
<DataType>
<BasicType Type="FLOAT"/>
</DataType>
</FormalParameter>
<FormalParameter Id="To" Index="To" Mode="OUT">
<DataType>
<BasicType Type="FLOAT"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="To = new java.lang.Double(From.doubleValue());"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="floatToString" Name="floatToString">
<Description>convert a Float to a String</Description>
<FormalParameters>
<FormalParameter Id="InputFloat" Index="InputFloat" Mode="IN">
<DataType>
<BasicType Type="FLOAT"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputString" Index="OutputString" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="OutputString = String.valueOf(InputFloat);"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="getCurrentTimestamp" Name="getCurrentTimestamp">
<Description>get the systen timestamp</Description>
<FormalParameters>
<FormalParameter Id="TheDate" Index="TheDate" Mode="OUT">
<DataType>
<BasicType Type="DATETIME"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="TheDate = java.util.Calendar.getInstance();"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="getCurrentUserReference" Name="getCurrentUserReference">
<Description>get the reference to the current user</Description>
<FormalParameters>
<FormalParameter Id="UserRef" Index="UserRef" Mode="OUT">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.GetCurrentUserReferenceToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="getLookupDescription" Name="getLookupDescription">
<Description>extract the description of the LookupType variable</Description>
<FormalParameters>
<FormalParameter Id="Lookup" Index="Lookup" Mode="IN">
<DataType>
<DeclaredType Id="Lookup"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Description" Index="Description" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="if( Ref == null ){ Description = &quot;&quot;; } else { Description = Lookup.description; }"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="getReferenceClassId" Name="getReferenceClassId">
<Description>extract the classId from a ReferenceType variable</Description>
<FormalParameters>
<FormalParameter Id="Ref" Index="Ref" Mode="IN">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ClassId" Index="ClassId" Mode="OUT">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="if( Ref == null ){ ClassId = -1; } else { ClassId = Ref.idClass; }"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="getReferenceDescription" Name="getReferenceDescription">
<Description>extract the description from a ReferenceType variable</Description>
<FormalParameters>
<FormalParameter Id="Ref" Index="Ref" Mode="IN">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Description" Index="Description" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="if( Ref == null ){ Description = &quot;&quot;; } else { Description = Ref.description; }"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="getReferenceFromArray" Name="getReferenceFromArray">
<Description>get the nth reference from the given reference array. If array is null or shorter than Index, then null is returned.</Description>
<FormalParameters>
<FormalParameter Id="RefArray" Index="RefArray" Mode="IN">
<DataType>
<DeclaredType Id="References"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Index" Index="Index" Mode="IN">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutRef" Index="OutRef" Mode="OUT">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="if(RefArray==null || RefArray.length &lt;= Index){OutRef=null;} else {OutRef = RefArray[Index.intValue()];}"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="getReferenceId" Name="getReferenceId">
<Description>extract the id from a ReferenceType variable</Description>
<FormalParameters>
<FormalParameter Id="Ref" Index="Ref" Mode="IN">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
<FormalParameter Id="CardId" Index="CardId" Mode="OUT">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="if( Ref == null ){ CardId = -1; } else { CardId = Ref.id; }"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="getReportFullUrl" Name="getReportFullUrl">
<Description>obtain the full Url to a report created by cmdbuild and returned by the createReport ext.attr.</Description>
<FormalParameters>
<FormalParameter Id="ReportUrl" Index="ReportUrl" Mode="INOUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.FullReportURLToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="intCopy" Name="intCopy">
<Description>copy an intenger into another</Description>
<FormalParameters>
<FormalParameter Id="From" Index="From" Mode="IN">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
<FormalParameter Id="To" Index="To" Mode="OUT">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="To = new java.lang.Long(From.longValue());"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="intToString" Name="intToString">
<Description>convert an Int to a String</Description>
<FormalParameters>
<FormalParameter Id="InputInt" Index="InputInt" Mode="IN">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputString" Index="OutputString" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="OutputString = String.valueOf(InputInt);"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="lookupToString" Name="lookupToString">
<Description>extract the lookup id and convert it to string</Description>
<FormalParameters>
<FormalParameter Id="InputLookup" Index="InputLookup" Mode="IN">
<DataType>
<DeclaredType Id="Lookup"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputString" Index="OutputString" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="OutputString = InputLookup.id + &quot;&quot;;"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="nextInt" Name="nextInt">
<Description>return the passed int incremented by 1</Description>
<FormalParameters>
<FormalParameter Id="InputInt" Index="InputInt" Mode="INOUT">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="InputInt++;"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="nextRef" Name="nextRef">
<Description>get the next reference element in an array, update hasNext boolean value and currentIndex index</Description>
<FormalParameters>
<FormalParameter Id="RefArray" Index="RefArray" Mode="IN">
<DataType>
<DeclaredType Id="References"/>
</DataType>
</FormalParameter>
<FormalParameter Id="HasNext" Index="HasNext" Mode="OUT">
<DataType>
<BasicType Type="BOOLEAN"/>
</DataType>
</FormalParameter>
<FormalParameter Id="CurrentIndex" Index="CurrentIndex" Mode="INOUT">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
<FormalParameter Id="CurrentValue" Index="CurrentValue" Mode="OUT">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="CurrentValue = RefArray[CurrentIndex.intValue()];CurrentIndex++;HasNext = ( CurrentIndex &lt; RefArray.length );"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="referenceToString" Name="referenceToString">
<Description>extract the reference id and convert it to string</Description>
<FormalParameters>
<FormalParameter Id="InputReference" Index="InputReference" Mode="IN">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputString" Index="OutputString" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="if(InputReference==null) OutputString =null; else OutputString =InputReference.id + &quot;&quot;;"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="resetIterator" Name="resetIterator">
<Description>set CurrentIndex to 0 and HasNext to (RefArray.length gt. 0)</Description>
<FormalParameters>
<FormalParameter Id="RefArray" Index="RefArray" Mode="IN">
<DataType>
<DeclaredType Id="References"/>
</DataType>
</FormalParameter>
<FormalParameter Id="HasNext" Index="HasNext" Mode="OUT">
<DataType>
<BasicType Type="BOOLEAN"/>
</DataType>
</FormalParameter>
<FormalParameter Id="CurrentIndex" Index="CurrentIndex" Mode="OUT">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="CurrentIndex = 0; HasNext = ( RefArray != null &amp;&amp; RefArray.length &gt; 0 );"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="resumeProcess" Name="resumeProcess">
<Description>resume the process</Description>
<FormalParameters>
<FormalParameter Id="ProcessInstanceId" Index="ProcessInstanceId" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.ProcessChangeStateToolAgent"/>
<ExtendedAttribute Name="State" Value="Resume"/>
</ExtendedAttributes>
</Application>
<Application Id="selectAttribute" Name="selectAttribute">
<Description>select an attribute</Description>
<FormalParameters>
<FormalParameter Id="ClassName" Index="ClassName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="AttributeName" Index="AttributeName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ObjId" Index="ObjId" Mode="IN">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
<FormalParameter Id="AttributeValue" Index="AttributeValue" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.SelectAttributeToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="selectAttributeFromReference" Name="selectAttributeFromReference">
<Description>select an attribute from a reference variable</Description>
<FormalParameters>
<FormalParameter Id="ObjReference" Index="ObjReference" Mode="IN">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
<FormalParameter Id="AttributeName" Index="AttributeName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="AttributeValue" Index="AttributeValue" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.SelectAttributeToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="selectLookup" Name="selectLookup">
<Description>select a lookup description from its type and id</Description>
<FormalParameters>
<FormalParameter Id="Type" Index="Type" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="LookupId" Index="LookupId" Mode="IN">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
<FormalParameter Id="LookupDescription" Index="LookupDescription" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.SelectLookupToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="selectLookupById" Name="selectLookupById">
<Description>select a lookup from it's id</Description>
<FormalParameters>
<FormalParameter Id="LookupId" Index="LookupId" Mode="IN">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Lookup" Index="Lookup" Mode="OUT">
<DataType>
<DeclaredType Id="Lookup"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.SelectLookupToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="selectLookupByTypeDesc" Name="selectLookupByTypeDesc">
<Description>select a lookup from it's type and description</Description>
<FormalParameters>
<FormalParameter Id="Type" Index="Type" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Description" Index="Description" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Lookup" Index="Lookup" Mode="OUT">
<DataType>
<DeclaredType Id="Lookup"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.SelectLookupToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="selectLookupFromOld" Name="selectLookupFromOld">
<Description>select a lookup from an old value and a new Description</Description>
<FormalParameters>
<FormalParameter Id="Description" Index="Description" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Lookup" Index="Lookup" Mode="INOUT">
<DataType>
<DeclaredType Id="Lookup"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.SelectLookupToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="selectReferenceByCode" Name="selectReferenceByCode">
<Description>select a reference by classname and code attribute</Description>
<FormalParameters>
<FormalParameter Id="ClassName" Index="ClassName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Code" Index="Code" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutRef" Index="OutRef" Mode="OUT">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.SelectReferenceToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="selectReferenceByCustomAttribute" Name="selectReferenceByCustomAttribute">
<Description>select a reference by classname and an attribute (the first matching reference will be returned)</Description>
<FormalParameters>
<FormalParameter Id="ClassName" Index="ClassName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="AttributeName" Index="AttributeName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="AttributeValue" Index="AttributeValue" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutRef" Index="OutRef" Mode="OUT">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.SelectReferenceToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="selectReferenceByReference" Name="selectReferenceByReference">
<Description>select a reference from another reference using its attribute name</Description>
<FormalParameters>
<FormalParameter Id="ObjReference" Index="ObjReference" Mode="IN">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
<FormalParameter Id="AttributeName" Index="AttributeName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutRef" Index="OutRef" Mode="OUT">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.SelectReferenceByReferenceToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="sendMail" Name="sendMail">
<Description>send an email</Description>
<FormalParameters>
<FormalParameter Id="FromAddresses" Index="FromAddresses" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ToAddresses" Index="ToAddresses" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Subject" Index="Subject" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Content" Index="Content" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="UrlAttachments" Index="UrlAttachments" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.MailToolAgent"/>
<ExtendedAttribute Name="AppMode" Value="0"/>
<ExtendedAttribute Name="AppName" Value="org.cmdbuild.shark.toolagent.SafeMailToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="stringCopy" Name="stringCopy">
<Description>copy a string into another</Description>
<FormalParameters>
<FormalParameter Id="From" Index="From" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="To" Index="To" Mode="OUT">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="To = new java.lang.String(From);"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="stringToBool" Name="stringToBool">
<Description>convert a string to a boolean</Description>
<FormalParameters>
<FormalParameter Id="InputString" Index="InputString" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputBoolean" Index="OutputBoolean" Mode="OUT">
<DataType>
<BasicType Type="BOOLEAN"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="OutputBoolean = new java.lang.Boolean(InputString);"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="stringToDate" Name="stringToDate">
<Description>convert a string into a date - accept YY/mm/dd or YY/mm/dd HH:mm:ss formatted strings</Description>
<FormalParameters>
<FormalParameter Id="InputString" Index="InputString" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputDate" Index="OutputDate" Mode="OUT">
<DataType>
<BasicType Type="DATETIME"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="if (InputString == null || InputString.trim().length() == 0) { OutputDate=null; } else { if (InputString.length() == 8) { sdf = new java.text.SimpleDateFormat(&quot;dd/MM/yy&quot;); } else if (InputString.length() == 17) { sdf = new java.text.SimpleDateFormat(&quot;dd/MM/yy HH:mm:ss&quot;); } else { throw new IllegalArgumentException(String.format(&quot;Unrecognized format: &quot;%s&quot;&quot;, InputString)); } calendar = java.util.Calendar.getInstance(); date = sdf.parse(InputString); calendar.setTime(date); OutputDate=calendar; }"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="stringToFloat" Name="stringToFloat">
<Description>convert a string to a float</Description>
<FormalParameters>
<FormalParameter Id="InputString" Index="InputString" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputFloat" Index="OutputFloat" Mode="OUT">
<DataType>
<BasicType Type="FLOAT"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="OutputInteger = new java.lang.Double(InputString);"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="stringToInt" Name="stringToInt">
<Description>convert a string to an integer</Description>
<FormalParameters>
<FormalParameter Id="InputString" Index="InputString" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="OutputInteger" Index="OutputInteger" Mode="OUT">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="OutputInteger = new java.lang.Long(InputString);"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="suspendProcess" Name="suspendProcess">
<Description>suspend the process. Use "CURRENT" as process instance id to pause the current process (paused to the next manual activity)</Description>
<FormalParameters>
<FormalParameter Id="ProcessInstanceId" Index="ProcessInstanceId" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.ProcessChangeStateToolAgent"/>
<ExtendedAttribute Name="State" Value="Suspend"/>
</ExtendedAttributes>
</Application>
<Application Id="updateAttribute" Name="updateAttribute">
<Description>update an attribute</Description>
<FormalParameters>
<FormalParameter Id="ClassName" Index="ClassName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="AttributeName" Index="AttributeName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="ObjId" Index="ObjId" Mode="IN">
<DataType>
<BasicType Type="INTEGER"/>
</DataType>
</FormalParameter>
<FormalParameter Id="AttributeValue" Index="AttributeValue" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Done" Index="Done" Mode="OUT">
<DataType>
<BasicType Type="BOOLEAN"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.UpdateAttributeToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="updateAttributeRef" Name="updateAttributeRef">
<Description>update an attribute of a reference object</Description>
<FormalParameters>
<FormalParameter Id="ObjRef" Index="ObjRef" Mode="IN">
<DataType>
<DeclaredType Id="Reference"/>
</DataType>
</FormalParameter>
<FormalParameter Id="AttributeName" Index="AttributeName" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="AttributeValue" Index="AttributeValue" Mode="IN">
<DataType>
<BasicType Type="STRING"/>
</DataType>
</FormalParameter>
<FormalParameter Id="Done" Index="Done" Mode="OUT">
<DataType>
<BasicType Type="BOOLEAN"/>
</DataType>
</FormalParameter>
</FormalParameters>
<ExtendedAttributes>
<ExtendedAttribute Name="ToolAgentClass" Value="org.cmdbuild.shark.toolagent.UpdateAttributeToolAgent"/>
</ExtendedAttributes>
</Application>
<Application Id="voidApp" Name="voidApp">
<Description>this tool does nothing</Description>
<ExtendedAttributes>
<ExtendedAttribute Name="Script" Value="foo = true;"/>
<ExtendedAttribute Name="ToolAgentClass" Value="org.enhydra.shark.toolagent.BshToolAgent"/>
</ExtendedAttributes>
</Application>
</Applications>
<Activities>
<Activity Id="Stato1" Name="Avvio del processo">
<Description>Esecuzione del  workflow Test 11 V 1.9.1
Step 1 - Inserimento delle informazioni
Sono richieste il nome utente
La data
Il numero ticket
Il produttore</Description>
<Implementation>
<No/>
</Implementation>
<Performer>SuperUser</Performer>
<ExtendedAttributes>
<ExtendedAttribute Name="JaWE_GRAPH_PARTICIPANT_ID" Value="SuperUser"/>
<ExtendedAttribute Name="JaWE_GRAPH_OFFSET" Value="163,53"/>
<ExtendedAttribute Name="VariableToProcess_UPDATE" Value="Utente"/>
<ExtendedAttribute Name="VariableToProcess_VIEW" Value="data"/>
<ExtendedAttribute Name="VariableToProcess_UPDATE" Value="ticket"/>
<ExtendedAttribute Name="VariableToProcess_UPDATE" Value="Produttore"/>
</ExtendedAttributes>
</Activity>
<Activity Id="Chiusura">
<Implementation>
<Tool Id="voidApp" Type="APPLICATION"/>
</Implementation>
<Performer>System</Performer>
<TransitionRestrictions>
<TransitionRestriction>
<Join Type="XOR"/>
</TransitionRestriction>
</TransitionRestrictions>
<ExtendedAttributes>
<ExtendedAttribute Name="JaWE_GRAPH_PARTICIPANT_ID" Value="System"/>
<ExtendedAttribute Name="JaWE_GRAPH_OFFSET" Value="624,77"/>
</ExtendedAttributes>
</Activity>
<Activity Id="Stato2" Name="Esecuzione Processo">
<Description>Stato 2 - stato del processo di esecuzione pre chiusura</Description>
<Implementation>
<No/>
</Implementation>
<Performer>SuperUser</Performer>
<ExtendedAttributes>
<ExtendedAttribute Name="JaWE_GRAPH_PARTICIPANT_ID" Value="SuperUser"/>
<ExtendedAttribute Name="JaWE_GRAPH_OFFSET" Value="563,41"/>
<ExtendedAttribute Name="VariableToProcess_VIEW" Value="ProcessClass"/>
<ExtendedAttribute Name="VariableToProcess_VIEW" Value="ProcessId"/>
<ExtendedAttribute Name="VariableToProcess_VIEW" Value="ProcessCode"/>
<ExtendedAttribute Name="VariableToProcess_VIEW" Value="Utente"/>
<ExtendedAttribute Name="VariableToProcess_UPDATE" Value="data"/>
<ExtendedAttribute Name="VariableToProcess_VIEW" Value="ticket"/>
</ExtendedAttributes>
</Activity>
<Activity Id="Send" Name="Invio Mail">
<Implementation>
<Tool Id="dateToString">
<ActualParameters>
<ActualParameter>data</ActualParameter>
<ActualParameter>datas</ActualParameter>
</ActualParameters>
</Tool>
<Tool Id="intToString">
<ActualParameters>
<ActualParameter>ticket</ActualParameter>
<ActualParameter>tickets</ActualParameter>
</ActualParameters>
</Tool>
<Tool Id="getLookupDescription">
<ActualParameters>
<ActualParameter>Produttore</ActualParameter>
<ActualParameter>ProduttoreS</ActualParameter>
</ActualParameters>
</Tool>
<Tool Id="concat8">
<ActualParameters>
<ActualParameter>"Utente "</ActualParameter>
<ActualParameter>Utente</ActualParameter>
<ActualParameter>"\n Data "</ActualParameter>
<ActualParameter>datas</ActualParameter>
<ActualParameter>"\n Ticket "</ActualParameter>
<ActualParameter>tickets</ActualParameter>
<ActualParameter>"\nProduttore --"</ActualParameter>
<ActualParameter>ProduttoreS</ActualParameter>
<ActualParameter>body</ActualParameter>
</ActualParameters>
</Tool>
<Tool Id="sendMail">
<ActualParameters>
<ActualParameter>test@test.it"</ActualParameter>
<ActualParameter>test@test.it"</ActualParameter>
<ActualParameter>"Test"</ActualParameter>
<ActualParameter>body</ActualParameter>
<ActualParameter>"http://www.test.it"</ActualParameter>
</ActualParameters>
</Tool>
</Implementation>
<Performer>System</Performer>
<TransitionRestrictions>
<TransitionRestriction>
<Split Type="XOR">
<TransitionRefs>
<TransitionRef Id="Process_servicedesk_tra4"/>
<TransitionRef Id="Process_servicedesk_tra3"/>
<TransitionRef Id="Process_servicedesk_tra6"/>
</TransitionRefs>
</Split>
</TransitionRestriction>
</TransitionRestrictions>
<ExtendedAttributes>
<ExtendedAttribute Name="JaWE_GRAPH_PARTICIPANT_ID" Value="System"/>
<ExtendedAttribute Name="JaWE_GRAPH_OFFSET" Value="421,27"/>
</ExtendedAttributes>
</Activity>
<Activity Id="RichiestaErrata" Name="Richiesta Errata">
<Implementation>
<No/>
</Implementation>
<Performer>SuperUser</Performer>
<ExtendedAttributes>
<ExtendedAttribute Name="JaWE_GRAPH_PARTICIPANT_ID" Value="SuperUser"/>
<ExtendedAttribute Name="JaWE_GRAPH_OFFSET" Value="356,154"/>
<ExtendedAttribute Name="VariableToProcess_VIEW" Value="ProduttoreS"/>
</ExtendedAttributes>
</Activity>
</Activities>
<Transitions>
<Transition From="Stato2" Id="Process_servicedesk_tra2" To="Chiusura">
<ExtendedAttributes>
<ExtendedAttribute Name="JaWE_GRAPH_TRANSITION_STYLE" Value="NO_ROUTING_SPLINE"/>
</ExtendedAttributes>
</Transition>
<Transition From="Send" Id="Process_servicedesk_tra3" To="Chiusura">
<Condition Type="CONDITION">ProduttoreS=="IBM"</Condition>
<ExtendedAttributes>
<ExtendedAttribute Name="JaWE_GRAPH_TRANSITION_STYLE" Value="NO_ROUTING_SPLINE"/>
</ExtendedAttributes>
</Transition>
<Transition From="Send" Id="Process_servicedesk_tra4" To="Stato2">
<Condition Type="CONDITION">ProduttoreS == "Microsoft" || Produttore == "Microsoft" || Produttore == "359" || ProduttoreS =="359" || Produttore == 359 || ProduttoreS == 359</Condition>
<ExtendedAttributes>
<ExtendedAttribute Name="JaWE_GRAPH_TRANSITION_STYLE" Value="NO_ROUTING_ORTHOGONAL"/>
</ExtendedAttributes>
</Transition>
<Transition From="Send" Id="Process_servicedesk_tra6" To="RichiestaErrata">
<Condition Type="OTHERWISE"/>
<ExtendedAttributes>
<ExtendedAttribute Name="JaWE_GRAPH_BREAK_POINTS" Value="463,192-563,192"/>
<ExtendedAttribute Name="JaWE_GRAPH_TRANSITION_STYLE" Value="SIMPLE_ROUTING_ORTHOGONAL"/>
</ExtendedAttributes>
</Transition>
<Transition From="RichiestaErrata" Id="Process_servicedesk_tra7" To="Chiusura">
<ExtendedAttributes>
<ExtendedAttribute Name="JaWE_GRAPH_BREAK_POINTS" Value="532,331-532,104"/>
<ExtendedAttribute Name="JaWE_GRAPH_TRANSITION_STYLE" Value="SIMPLE_ROUTING_ORTHOGONAL"/>
</ExtendedAttributes>
</Transition>
<Transition From="Stato1" Id="Process_servicedesk_tra1" To="Send">
<ExtendedAttributes>
<ExtendedAttribute Name="JaWE_GRAPH_TRANSITION_STYLE" Value="NO_ROUTING_SPLINE"/>
</ExtendedAttributes>
</Transition>
</Transitions>
<ExtendedAttributes>
<ExtendedAttribute Name="JaWE_GRAPH_END_OF_WORKFLOW" Value="JaWE_GRAPH_PARTICIPANT_ID=System,CONNECTING_ACTIVITY_ID=Chiusura,X_OFFSET=769,Y_OFFSET=82,JaWE_GRAPH_TRANSITION_STYLE=SIMPLE_ROUTING_BEZIER,TYPE=END_DEFAULT"/>
<ExtendedAttribute Name="JaWE_GRAPH_START_OF_WORKFLOW" Value="JaWE_GRAPH_PARTICIPANT_ID=SuperUser,CONNECTING_ACTIVITY_ID=Stato1,X_OFFSET=62,Y_OFFSET=44,JaWE_GRAPH_TRANSITION_STYLE=SIMPLE_ROUTING_BEZIER,TYPE=START_DEFAULT"/>
<ExtendedAttribute Name="cmdbuildBindToClass" Value="Servicedesk"/>
<ExtendedAttribute Name="userStoppable" Value="false"/>
<ExtendedAttribute Name="JaWE_GRAPH_WORKFLOW_PARTICIPANT_ORDER" Value="System;SuperUser"/>
</ExtendedAttributes>
</WorkflowProcess>
</WorkflowProcesses>
<ExtendedAttributes>
<ExtendedAttribute Name="EDITING_TOOL" Value="JPEd - JaWE based Process Editor"/>
<ExtendedAttribute Name="EDITING_TOOL_VERSION" Value="2.0-2(4?)-C-20071018-1740"/>
</ExtendedAttributes>
</Package>

 

nella versione allegato ho provato attraverso la funzione getLookupDescription ma ho anche provato le altre funzioni nuove che utilizzano o manipolano le lookup senza successo

Suggerimenti?

 

Grazie

 

 

 

Salve,

sono sbagliate le condizioni riportate sulle frecce. Come nella vecchia versione 090 le condizioni sulle frecce devono seguire una sintassi Java (o per essere piu' precisi BSH 1.2) :  non si deve utilizzare == ma equals, perchè si confrontano due oggetti String, non due tipi primitivi.

Ad esempio, la prima condizione quindi risulterà ProduttoreS.equals("IBM").

 

 

Grazie per l'indicazione, modificherò il workflow come indicato

 

Donato

 

 

Previously Tecnoteca wrote:

Salve,

sono sbagliate le condizioni riportate sulle frecce. Come nella vecchia versione 090 le condizioni sulle frecce devono seguire una sintassi Java (o per essere piu' precisi BSH 1.2) :  non si deve utilizzare == ma equals, perchè si confrontano due oggetti String, non due tipi primitivi.

Ad esempio, la prima condizione quindi risulterà ProduttoreS.equals("IBM").

 

 

 

Il test dopo le modifiche ha funzionato, avrei bisogno di sapere se avete un qualche riferimento a dove trovare un breve primer della sintassi BSH 1.2.

 

Grazie

Donato

 

 

Previously Donato wrote:

Grazie per l'indicazione, modificherò il workflow come indicato

 

Donato

 

 

Previously Tecnoteca wrote:

Salve,

sono sbagliate le condizioni riportate sulle frecce. Come nella vecchia versione 090 le condizioni sulle frecce devono seguire una sintassi Java (o per essere piu' precisi BSH 1.2) :  non si deve utilizzare == ma equals, perchè si confrontano due oggetti String, non due tipi primitivi.

Ad esempio, la prima condizione quindi risulterà ProduttoreS.equals("IBM").