I am unable to retrieve schema of Clickhouse Database in Talend Open Studio. Can someone guide me? - talend

I am trying to import a Clickhouse schema in Talend Open Studio ETL software. The steps that I have followed are:
I created a connection in Talend Open Studio with ClickHouse using the credentials shown below in screenshot 1.
ScreenShot of Connection
In the mapping file option, There is no default file for Clickhouse. That's why I have tried both the Java or Mysql database mapping file and I can create a successful connection with both.
While importing schema, the menu shows me the "default" catalog. When I expand it, it lists all the schemas in it. When I select a schema to import, It keeps on retrieving the "Next" button remains disabled as shown in the image below 2.
ScreenShot of Retrieving Schema
I have also tried by creating a custom mapping file for Clickhouse and importing it in Talend. The content for that file is:
<?xml version="1.0"?>
-<mapping>
-<dbms default="true" label="Mapping Clickhouse" id="clickhouse_id" product="CLICKHOUSE">
-<dbTypes>
<dbType ignorePre="true" ignoreLen="true" type="String"/>
<dbType ignorePre="true" ignoreLen="true" type="UUID"/>
<dbType ignorePre="true" ignoreLen="true" type="Date"/>
<dbType ignorePre="true" ignoreLen="true" type="DateTime"/>
<dbType ignorePre="true" ignoreLen="true" type="DateTime64"/>
<dbType type="Decimal32" preBeforelen="false" defaultPrecision="10" defaultLength="20"/>
<dbType type="Decimal64" preBeforelen="false" defaultPrecision="10" defaultLength="20"/>
<dbType type="Decimal128" preBeforelen="false" defaultPrecision="10" defaultLength="20"/>
<dbType type="Decimal256" preBeforelen="false" defaultPrecision="10" defaultLength="20"/>
<dbType type="Float64" defaultPrecision="10" defaultLength="20"/>
<dbType ignorePre="true" ignoreLen="true" type="Enum"/>
<dbType type="Float32" defaultPrecision="2"/>
<dbType ignorePre="true" type="Int8"/>
<dbType ignorePre="true" ignoreLen="true" type="UInt8"/>
<dbType ignorePre="true" type="Int16"/>
<dbType ignorePre="true" ignoreLen="true" type="UInt16"/>
<dbType ignorePre="true" type="Int32"/>
<dbType ignorePre="true" ignoreLen="true" type="UInt32"/>
<dbType ignorePre="true" type="Int64"/>
<dbType ignorePre="true" ignoreLen="true" type="UInt64"/>
<dbType ignorePre="true" type="Int128"/>
<dbType ignorePre="true" type="Int256"/>
<dbType ignorePre="true" ignoreLen="true" type="UInt256"/>
<dbType default="true" ignorePre="true" type="FixedString" defaultLength="100"/>
<dbType ignorePre="true" ignoreLen="true" type="LowCardinality"/>
.
<dbType ignorePre="true" ignoreLen="true" type="Array"/>
<dbType ignorePre="true" ignoreLen="true" type="AggregateFunction"/>
<dbType ignorePre="true" ignoreLen="true" type="Nested"/>
<dbType ignorePre="true" ignoreLen="true" type="Tuple"/>
<dbType ignorePre="true" ignoreLen="true" type="Expression"/>
<dbType ignorePre="true" ignoreLen="true" type="Set"/>
<dbType ignorePre="true" ignoreLen="true" type="Nothing"/>
<dbType ignorePre="true" ignoreLen="true" type="Interval"/>
<dbType ignorePre="true" ignoreLen="true" type="IPv4"/>
<dbType ignorePre="true" ignoreLen="true" type="IPv6"/>
</dbTypes>
-<language name="java">
-<talendToDbTypes>
<!-- Adviced mappings -->
<talendType type="id_List"/>
-<talendType type="id_Boolean">
<dbType default="true" type="UInt8"/>
</talendType>
-<talendType type="id_Character">
<dbType default="true" type="String"/>
<dbType type="FixedString"/>
</talendType>
-<talendType type="id_Date">
<dbType type="Date"/>
<dbType default="true" type="DateTime"/>
<dbType default="true" type="DateTime64"/>
</talendType>
-<talendType type="id_BigDecimal">
<dbType default="true" type="Decimal32"/>
<dbType default="true" type="Decimal64"/>
<dbType default="true" type="Decimal28"/>
<dbType default="true" type="Decimal256"/>
<dbType type="Float64"/>
<dbType type="Float32"/>
</talendType>
-<talendType type="id_Double">
<dbType default="true" type="Decimal32"/>
<dbType default="true" type="Decimal64"/>
<dbType default="true" type="Decimal28"/>
<dbType default="true" type="Decimal256"/>
<dbType type="Float64"/>
<dbType type="Float32"/>
</talendType>
-<talendType type="id_Float">
<dbType default="true" type="Decimal32"/>
<dbType default="true" type="Decimal64"/>
<dbType default="true" type="Decimal28"/>
<dbType default="true" type="Decimal256"/>
<dbType type="Float64"/>
<dbType type="Float32"/>
</talendType>
-<talendType type="id_Integer">
<dbType default="true" type="Int8"/>
<dbType default="true" type="Int16"/>
<dbType default="true" type="Int32"/>
<dbType default="true" type="Int64"/>
<dbType default="true" type="Int128"/>
<dbType default="true" type="Int256"/>
</talendType>
-<talendType type="id_Long">
<dbType default="true" type="Int128"/>
<dbType default="true" type="Int256"/>
</talendType>
-<talendType type="id_Object">
<dbType type="Enum"/>
</talendType>
-<talendType type="id_Short">
<dbType default="true" type="Int8"/>
<dbType default="true" type="Int16"/>
<dbType default="true" type="Int32"/>
<dbType default="true" type="Int64"/>
</talendType>
-<talendType type="id_String">
<dbType default="true" type="String"/>
<dbType type="FixedString"/>
</talendType>
</talendToDbTypes>
-<dbToTalendTypes>
-<dbType type="Int128">
<talendType default="true" type="id_Long"/>
</dbType>
-<dbType type="Int256">
<talendType default="true" type="id_Long"/>
</dbType>
-<dbType type="UInt8">
<talendType default="true" type="id_Boolean"/>
</dbType>
-<dbType type="String">
<talendType default="true" type="id_String"/>
</dbType>
-<dbType type="FixedString">
<talendType default="true" type="id_String"/>
</dbType>
-<dbType type="Date">
<talendType default="true" type="id_Date"/>
</dbType>
-<dbType type="DateTime">
<talendType default="true" type="id_Date"/>
</dbType>
-<dbType type="DateTime64">
<talendType default="true" type="id_Date"/>
</dbType>
-<dbType type="Decimal32">
<talendType default="true" type="id_Float"/>
<talendType type="id_Double"/>
<talendType type="id_BigDecimal"/>
</dbType>
-<dbType type="Decimal64">
<talendType default="true" type="id_Float"/>
<talendType type="id_Double"/>
<talendType type="id_BigDecimal"/>
</dbType>
-<dbType type="Decimal128">
<talendType default="true" type="id_Float"/>
<talendType type="id_Double"/>
<talendType type="id_BigDecimal"/>
</dbType>
-<dbType type="Decimal256">
<talendType default="true" type="id_Float"/>
<talendType type="id_Double"/>
<talendType type="id_BigDecimal"/>
</dbType>
-<dbType type="Float32">
<talendType default="true" type="id_Double"/>
<talendType type="id_BigDecimal"/>
</dbType>
-<dbType type="Float64">
<talendType default="true" type="id_Double"/>
<talendType type="id_BigDecimal"/>
</dbType>
-<dbType type="Enum">
<talendType default="true" type="id_Object"/>
</dbType>
-<dbType type="Int8">
<talendType default="true" type="id_Integer"/>
<talendType type="id_Long"/>
</dbType>
-<dbType type="Int16">
<talendType default="true" type="id_Integer"/>
<talendType type="id_Long"/>
</dbType>
-<dbType type="Int32">
<talendType default="true" type="id_Integer"/>
<talendType type="id_Long"/>
</dbType>
-<dbType type="Int64">
<talendType default="true" type="id_Integer"/>
<talendType type="id_Long"/>
</dbType>
-<dbType type="Int128">
<talendType default="true" type="id_Integer"/>
<talendType type="id_Long"/>
</dbType>
-<dbType type="Int256">
<talendType default="true" type="id_Integer"/>
<talendType type="id_Long"/>
</dbType>
-<dbType type="UInt16">
<talendType default="true" type="id_Integer"/>
<talendType type="id_Long"/>
</dbType>
-<dbType type="UInt32">
<talendType default="true" type="id_Integer"/>
<talendType type="id_Long"/>
</dbType>
-<dbType type="UInt64">
<talendType default="true" type="id_Integer"/>
<talendType type="id_Long"/>
</dbType>
-<dbType type="UInt256">
<talendType default="true" type="id_Integer"/>
<talendType type="id_Long"/>
</dbType>
-<dbType type="Set">
<talendType default="true" type="id_Object"/>
</dbType>
</dbToTalendTypes>
</language>
</dbms>
</mapping>

Related

How to get a variable from WSDL with mule setvariable and datamapper? Message payload is of type: HashMap

It should be simple but I can't set it working. My XML looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:ws="http://www.mulesoft.org/schema/mule/ws" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/ws http://www.mulesoft.org/schema/mule/ws/current/mule-ws.xsd
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<ws:consumer-config name="Web_Service_Consumer" wsdlLocation="http://procese/sysworkflow/en/classic/services/wsdl2" service="ProcessMakerService" port="ProcessMakerServiceSoap" serviceAddress="http://procese:80/sysworkflow/en/classic/services/soap2" doc:name="Web Service Consumer"/>
<data-mapper:config name="JSON_To_XML" transformationGraphPath="json_to_xml.grf" doc:name="JSON_To_XML"/>
<flow name="ws_pm_login3Flow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
<set-payload value="#[{"userid":"xyz.qwe", "password":"12345"}]" doc:name="Set Payload"/>
<data-mapper:transform config-ref="JSON_To_XML" doc:name="JSON To XML"/>
<ws:consumer config-ref="Web_Service_Consumer" operation="login" doc:name="Web Service Consumer"/>
</flow>
</mule>
The WS is working fine.
The mapper file json_to_xml.grf looks like:
<?xml version="1.0" encoding="UTF-8"?><Graph __version="3.5.0" author="abc" created="Tue Apr 21 13:27:56 EEST 2015" description="JSON To XML" guiVersion="3.4.4.P" id="1429614596881" licenseCode="Unlicensed" licenseType="Unknown" modified="Tue Apr 21 13:27:56 EEST 2015" modifiedBy="abc" name="JSON_To_XML" revision="1.0" showComponentDetails="false">
<Global>
<Metadata __index="0" __referenceCounter="1" __sourcePath="{}/login" _dataStructure="OBJECT" _id="__id" _type="Input" id="e941872a-c0e5-4148-ac8c-6010c4dad903">
<Record fieldDelimiter="," name="login" recordDelimiter="\n\\|\r\n\\|\r" type="delimited">
<Field __artificialType="_id" __systemManaged="true" name="__id" type="string"/>
<Field __index="1" __sourcePath="{}/login/password" containerType="SINGLE" label="password" name="password" type="string"/>
<Field __index="0" __sourcePath="{}/login/userid" containerType="SINGLE" label="userid" name="userid" type="string"/>
</Record>
</Metadata>
<Metadata __index="0" __referenceCounter="1" __sourcePath="{}/login" _dataStructure="OBJECT" _id="__id" _type="Output" id="d9e5b0f6-b757-46cb-89bf-a7662be5c77f">
<Record fieldDelimiter="," name="login" recordDelimiter="\n\\|\r\n\\|\r" type="delimited">
<Field __artificialType="_id" __systemManaged="true" name="__id" type="string"/>
<Field __index="0" __sourcePath="{}/login/password" containerType="SINGLE" label="password" name="password" type="string"/>
<Field __index="1" __sourcePath="{}/login/userid" containerType="SINGLE" label="userid" name="userid" type="string"/>
</Record>
</Metadata>
<Dictionary>
<Entry id="DictionaryEntry0" input="true" name="inputPayload" output="false" type="object"/>
<Entry id="DictionaryEntry1" input="false" name="outputPayload" output="true" type="object"/>
</Dictionary>
</Global>
<Phase number="0">
<Node cacheInMemory="true" charset="UTF-8" enabled="enabled" fileURL="dict:outputPayload" guiName="XML WRITER" guiX="900" guiY="20" id="EXT_XML_WRITER0" type="EXT_XML_WRITER">
<attr name="mapping"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<login xmlns:clover="http://www.cloveretl.com/ns/xmlmapping" clover:inPort="0">
<password>$0.password</password>
<userid>$0.userid</userid>
</login>]]></attr>
<attr name="_data_format"><![CDATA[XML]]></attr>
</Node>
<Node enabled="enabled" guiName="Foreach 'login' -> 'login'" guiX="460" guiY="20" id="FOREACH_LOGIN_LOGIN" transformClass="com.mulesoft.datamapper.transform.MelRecordTransform" type="REFORMAT">
<attr name="melScript"><![CDATA[//MEL
//START -> DO NOT REMOVE
output.__id = input.__id;
//END -> DO NOT REMOVE
output.password = input.password;
output.userid = input.userid;
]]></attr>
</Node>
<Node charset="UTF-8" enabled="enabled" fileURL="dict:inputPayload" guiName="JSON READER" guiX="20" guiY="20" id="JSON_READER0" type="JSON_READER">
<attr name="mapping"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Context xpath="/root">
<Context outPort="0" sequenceField="__id" xpath="object">
<Mapping cloverField="password" trim="true" xpath="password"/>
<Mapping cloverField="userid" trim="true" xpath="userid"/>
</Context>
</Context>
]]></attr>
<attr name="_data_format"><![CDATA[JSON]]></attr>
</Node>
<Edge debugMode="true" fromNode="FOREACH_LOGIN_LOGIN:0" guiBendpoints="" id="Edge1" inPort="Port 0 (in)" metadata="d9e5b0f6-b757-46cb-89bf-a7662be5c77f" outPort="Port 0 (out)" toNode="EXT_XML_WRITER0:0"/>
<Edge debugMode="true" fromNode="JSON_READER0:0" guiBendpoints="" id="Edge0" inPort="Port 0 (in)" metadata="e941872a-c0e5-4148-ac8c-6010c4dad903" outPort="Port 0 (out)" toNode="FOREACH_LOGIN_LOGIN:0"/>
</Phase>
</Graph>
When I start the process I get:
Error executing graph: ERROR (com.mulesoft.mule.module.datamapper.api.exception.DataMapperExecutionException). Message payload is of type: HashMap
I am using 3.6.1 EE
What am I missing?
Turns out it is a problem in mule to use the double quotes in JSON. I swithced to XML and now it is working fine.

Alfresco Workflow Share Form

I am trying to build a custom workflow in alfresco community edition. Basically I am trying to modify the existing workflow called lifecycleprocess. I have been able to deploy the process using workflow console without error. But I am not able to do any change at all on the workflow form. My workflow is called leaveprocess and I have the following code :
Path : alfresco/tomcat/shared/classes/alfresco/extension/
leave-process-bpmn20.xml
<?xml version="1.0" encoding="UTF-8" ?>
<definitions id="leave-definitions"
typeLanguage="http://www.w3.org/2001/XMLSchema"
expressionLanguage="http://www.w3.org/1999/XPath"
targetNamespace="http://activiti.org/bpmn20"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:activiti="http://activiti.org/bpmn">
<process id="activitileaveApproval" name="Leave Process">
<extensionElements>
<!-- When process is deleted/cancelled, status should be set to draft -->
<activiti:executionListener event="end" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
<activiti:field name="script">
<activiti:string>
if(cancelled || deleted) {
for (var i = 0; i < bpm_package.children.length; i++)
{
if (!bpm_package.children[i].hasAspect("wfl:status"))
{
bpm_package.children[i].properties["wfl:status"] = "Draft";
bpm_package.children[i].save();
}
}
}
</activiti:string>
</activiti:field>
</activiti:executionListener>
</extensionElements>
<startEvent id="start"
activiti:formKey="wf:submitReviewTask" />
<sequenceFlow id='flow1'
sourceRef='start'
targetRef='reviewTask'>
<extensionElements>
<activiti:executionListener event="take" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
<activiti:field name="script">
<activiti:string>
for (var i = 0; i < bpm_package.children.length; i++)
{
if (!bpm_package.children[i].hasAspect("wfl:status"))
{
bpm_package.children[i].addAspect("wfl:status");
}
}
</activiti:string>
</activiti:field>
</activiti:executionListener>
</extensionElements>
</sequenceFlow>
<userTask id="reviewTask" name="Review Task"
activiti:formKey="wf:activitiReviewTask">
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate);
for (var i = 0; i < bpm_package.children.length; i++)
{
if (bpm_package.children[0].hasAspect("wfl:status")) {
bpm_package.children[i].properties["wfl:status"] = "In Review";
bpm_package.children[i].save();
}
}
</activiti:string>
</activiti:field>
</activiti:taskListener>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
execution.setVariable('wf_reviewOutcome', task.getVariable('wf_reviewOutcome'));
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
<humanPerformer>
<resourceAssignmentExpression>
<formalExpression>${bpm_assignee.properties.userName}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id='flow2'
sourceRef='reviewTask'
targetRef='reviewDecision' />
<exclusiveGateway id="reviewDecision" name="Review Decision" />
<sequenceFlow id='flow3' sourceRef='reviewDecision' targetRef='approved' >
<conditionExpression xsi:type="tFormalExpression">${wf_reviewOutcome == 'Approve'}</conditionExpression>
</sequenceFlow>
<sequenceFlow id='flow4'
sourceRef='reviewDecision'
targetRef='rejected' />
<userTask id="approved" name="Document Approved"
activiti:formKey="wf:approvedTask" >
<documentation>
The document was reviewed and approved.
</documentation>
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate);
for (var i = 0; i < bpm_package.children.length; i++)
{
if (bpm_package.children[0].hasAspect("wfl:status")) {
bpm_package.children[i].properties["wfl:status"] = "Approved";
bpm_package.children[i].save();
}
}
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
<humanPerformer>
<resourceAssignmentExpression>
<formalExpression>${initiator.properties.userName}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<userTask id="rejected" name="Document Rejected"
activiti:formKey="wf:rejectedTask" >
<documentation>
The document was reviewed and rejected.
</documentation>
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate);
for (var i = 0; i < bpm_package.children.length; i++)
{
if (bpm_package.children[0].hasAspect("wfl:status"))
{
bpm_package.children[i].properties["wfl:status"] = "Draft";
bpm_package.children[i].save();
}
}
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
<humanPerformer>
<resourceAssignmentExpression>
<formalExpression>${initiator.properties.userName}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id='flow5' sourceRef='approved'
targetRef='end' />
<sequenceFlow id='flow6' sourceRef='rejected'
targetRef='end' />
<endEvent id="end" />
</process>
</definitions>
leave-messages.properties
# For JBPM leave Workflow Example
wfl_leaveapproval.workflow.title=Leave Application
wfl_leaveapproval.workflow.description=Leave Application (Auto updates document status)
wfl_leaveapproval.node.review.transition.reject.title=Reject
wfl_leaveapproval.node.review.transition.reject.description=Reject
wfl_leaveapproval.node.review.transition.approve.title=Approve
wfl_leaveapproval.node.review.transition.approve.description=Approve
# For Activiti leave Workflow Example
activitileaveApproval=Leave Application
activitileaveApproval=Leave Application workflow Activiti (Auto updates document status)
leave-workflow-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="leave.workflowBootstrap" parent="workflowDeployer">
<property name="workflowDefinitions">
<list>
<!-- JBPM version of leave process -->
<props>
<prop key="engineId">jbpm</prop>
<prop key="location">alfresco/extension/leave_processdefinition.xml</prop>
<prop key="mimetype">text/xml</prop>
<prop key="redeploy">false</prop>
</props>
<!-- Activiti version of leave process -->
<props>
<prop key="engineId">activiti</prop>
<prop key="location">alfresco/extension/leave-process.bpmn20.xml</prop>
<prop key="mimetype">text/xml</prop>
<prop key="redeploy">false</prop>
</props>
</list>
</property>
<property name="models">
<list>
<value>alfresco/extension/leaveModel.xml</value>
</list>
</property>
<property name="labels">
<list>
<value>alfresco/extension/leave-messages</value>
</list>
</property>
</bean>
</beans>
leave_processdefinition.xml
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wfl:leaveapproval">
<swimlane name="initiator" />
<start-state name="start">
<task name="wf:submitReviewTask" swimlane="initiator" />
<event type="node-leave">
<!-- Call script once the workflow package exists i.e. on node-leave -->
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<!-- Apply the Workflow leave Aspect (wfl:status) if not set already. Note: The default wfl:status property is draft -->
<script>
for (var i = 0; i < bpm_package.children.length; i++)
{
if (!bpm_package.children[i].hasAspect("wfl:status"))
{
bpm_package.children[i].addAspect("wfl:status");
}
}
</script>
</action>
</event>
<transition name="" to="review" />
</start-state>
<swimlane name="reviewer">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{bpm_assignee}</actor>
</assignment>
</swimlane>
<task-node name="review">
<event type="node-enter">
<!-- Update the status to In Review when we enter this task -->
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
for (var i = 0; i < bpm_package.children.length; i++)
{
bpm_package.children[i].properties["wfl:status"] = "In Review";
bpm_package.children[i].save();
}
</script>
</action>
</event>
<task name="wf:reviewTask" swimlane="reviewer">
<event type="task-create">
<script>
if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
</script>
</event>
</task>
<transition name="approve" to="approved" />
<transition name="reject" to="rejected" />
</task-node>
<task-node name="rejected">
<event type="node-enter">
<!-- Update the status to Draft when we enter this task -->
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
for (var i = 0; i < bpm_package.children.length; i++)
{
bpm_package.children[i].properties["wfl:status"] = "Draft";
bpm_package.children[i].save();
}
</script>
</action>
</event>
<task name="wf:rejectedTask" swimlane="initiator" />
<transition name="" to="end" />
</task-node>
<task-node name="approved">
<event type="node-enter">
<!-- Update the status to Approved when we enter this task -->
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
for (var i = 0; i < bpm_package.children.length; i++)
{
bpm_package.children[i].properties["wfl:status"] = "Approved";
bpm_package.children[i].save();
}
</script>
</action>
</event>
<task name="wf:approvedTask" swimlane="initiator" />
<transition name="" to="end" />
</task-node>
<end-state name="end" />
<event type="process-end">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
if (cancelled)
{
for (var i = 0; i < bpm_package.children.length; i++)
{
if (bpm_package.children[0].hasAspect("wfl:status"))
{
bpm_package.children[i].properties["wfl:status"] = "Draft";
bpm_package.children[i].save();
}
}
if (logger.isLoggingEnabled()) logger.log("Workflow cancelled, status reset to Draft");
}
else
{
if (logger.isLoggingEnabled()) logger.log("Workflow completed");
}
</script>
</action>
</event>
</process-definition>
leaveModel.xml
<?xml version="1.0" encoding="UTF-8"?>
<model name="wfl:workflowleavemodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>Workflow leave Model</description>
<author></author>
<version>1.0</version>
<!-- Imports are required to allow references to definitions in other models -->
<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
</imports>
<namespaces>
<namespace uri="wfl.model" prefix="wfl" />
</namespaces>
<constraints>
<constraint name="wfl:status" type="LIST">
<parameter name="allowedValues">
<list>
<value>Draft</value>
<value>In Review</value>
<value>Approved</value>
</list>
</parameter>
</constraint>
</constraints>
<aspects>
<!-- Status property is used to manage workflow approval -->
<aspect name="wfl:status">
<title>Status</title>
<properties>
<property name="wfl:status">
<title>Status</title>
<type>d:text</type>
<default>Draft</default>
<constraints>
<constraint ref="wfl:status" />
</constraints>
</property>
</properties>
</aspect>
</aspects>
</model>
Path : alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco/
share-workflow-form-config.xml
<!-- Leave Workflow Definition -->
<config evaluator="string-compare" condition="jbpm$wfl:leaveApproval">
<forms>
<form>
<field-visibility>
<show id="bpm:workflowDescription" />
<show id="bpm:workflowDueDate" />
<show id="bpm:workflowPriority" />
<show id="bpm:assignee" />
<show id="packageItems" />
<show id="bpm:sendEMailNotifications" />
</field-visibility>
<appearance>
<set id="" appearance="title" label-id="workflow.set.general" />
<set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
<set id="assignee" appearance="title" label-id="workflow.set.assignee" />
<set id="items" appearance="title" label-id="workflow.set.items" />
<set id="other" appearance="title" label-id="workflow.set.other" />
<field id="bpm:workflowDescription" label-id="workflow.field.message">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 95%</control-param>
</control>
</field>
<field id="bpm:workflowDueDate" label-id="workflow.field.due" set="info" />
<field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info">
<control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
</field>
<field id="bpm:assignee" label-id="workflow.field.reviewer" set="assignee" />
<field id="packageItems" set="items" />
<field id="bpm:sendEMailNotifications" set="other">
<control template="/org/alfresco/components/form/controls/workflow/email-notification.ftl" />
</field>
</appearance>
</form>
</forms>
</config>
<config evaluator="string-compare" condition="activiti$activitileaveApproval">
<forms>
<form>
<field-visibility>
<show id="bpm:workflowDescription" />
<show id="bpm:workflowDueDate" />
<show id="bpm:workflowPriority" />
<show id="bpm:assignee" />
<show id="packageItems" />
<show id="bpm:sendEMailNotifications" />
</field-visibility>
<appearance>
<set id="" appearance="title" label-id="workflow.set.general" />
<set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
<set id="assignee" appearance="title" label-id="workflow.set.assignee" />
<set id="items" appearance="title" label-id="workflow.set.items" />
<set id="other" appearance="title" label-id="workflow.set.other" />
<field id="bpm:workflowDescription" label-id="workflow.field.message">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 95%</control-param>
</control>
</field>
<field id="bpm:workflowDueDate" label-id="workflow.field.due" set="info">
<control template="/org/alfresco/components/form/controls/date.ftl">
<control-param name="showTime">false</control-param>
<control-param name="submitTime">false</control-param>
</control>
</field>
<field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info">
<control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
</field>
<field id="bpm:assignee" label-id="workflow.field.reviewer" set="assignee" />
<field id="packageItems" set="items" />
<field id="bpm:sendEMailNotifications" set="other">
<control template="/org/alfresco/components/form/controls/workflow/email-notification.ftl" />
</field>
</appearance>
</form>
</forms>
</config>
I am unable to understand, no matter what changes I do in this code for share-workflow-form-config.xml, It does not reflect when go to Share->Workflows I've started->select Leave Process. It always show the default form there. Somebody please guide me what I am doing wrong here.
You need to replace this
<form>
with following line
<form id="workflow-details">
means add attribute "id" in your form tag
After making changes in share-config you have to restart alfresco :)
Deploy of workflow (via workflow console) makes just re-deploy of the workflow definitions (also like deploy of models,.. )
But
<config evaluator="string-compare" condition="jbpm$wfl:leaveApproval">
Should works :D, no other idea why not working..

Specify local XSD schema in XML file

I need to validate an XML file and using eclipse to do it. I've added the XML file and all XSD file to a project:
I've added a reference to the XSD file:
<?xml version="1.0" encoding="UTF-8"?>
<S2SDDDnf:MPEDDDnfBlkDirDeb xmlns = "MPEDDDnfBlkDirDeb.xsd">
<S2SDDDnf:SndgInst>stuff</S2SDDDnf:SndgInst>
<S2SDDDnf:RcvgInst>stuff</S2SDDDnf:RcvgInst>
<S2SDDDnf:SrvcId>COR</S2SDDDnf:SrvcId>
<S2SDDDnf:TstCode>T</S2SDDDnf:TstCode>
<S2SDDDnf:FType>DNF</S2SDDDnf:FType>
<S2SDDDnf:FileRef>DNFMJMD%R5%LXXX</S2SDDDnf:FileRef>
<S2SDDDnf:FileBusDt>2013-10-18</S2SDDDnf:FileBusDt>
<S2SDDDnf:RoutingInd>ALL</S2SDDDnf:RoutingInd>
<S2SDDDnf:FileCycleNo>01</S2SDDDnf:FileCycleNo>
<S2SDDDnf:NumDDBlk>1</S2SDDDnf:NumDDBlk>
<S2SDDDnf:NumPCRBlk>0</S2SDDDnf:NumPCRBlk>
<S2SDDDnf:NumREJBlk>0</S2SDDDnf:NumREJBlk>
<S2SDDDnf:FIToFICstmrDrctDbt xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.003.001.02"
xmlns:S2SDDDnf="urn:S2SDDDnf:xsd:$MPEDDDnfBlkDirDeb">
<GrpHdr>
<MsgId>DNF.UAIAO47X2B</MsgId>
<CreDtTm>2013-10-18T15:40:00</CreDtTm>
<NbOfTxs>1</NbOfTxs>
<TtlIntrBkSttlmAmt Ccy="EUR">1025.00</TtlIntrBkSttlmAmt>
<IntrBkSttlmDt>2013-10-22</IntrBkSttlmDt>
<SttlmInf>
<SttlmMtd>CLRG</SttlmMtd>
<ClrSys>
<Prtry>ST2</Prtry>
</ClrSys>
</SttlmInf>
<InstdAgt>
<FinInstnId>
<BIC>stuff</BIC>
</FinInstnId>
</InstdAgt>
</GrpHdr>
<DrctDbtTxInf>
<PmtId>
<InstrId>DDPreTest18</InstrId>
<EndToEndId>TS141GENR-ZLDL%R5%WXXX</EndToEndId>
<TxId>TRXID01.R8NRO%R4%D</TxId>
</PmtId>
<PmtTpInf>
<SvcLvl>
<Cd>SEPA</Cd>
</SvcLvl>
<LclInstrm>
<Cd>CORE</Cd>
</LclInstrm>
<SeqTp>OOFF</SeqTp>
</PmtTpInf>
<IntrBkSttlmAmt Ccy="EUR">1025.00</IntrBkSttlmAmt>
<ChrgBr>SLEV</ChrgBr>
<ReqdColltnDt>2013-10-22</ReqdColltnDt>
<DrctDbtTx>
<MndtRltdInf>
<MndtId>Mndt141.001b</MndtId>
<DtOfSgntr>2013-09-16</DtOfSgntr>
<AmdmntInd>false</AmdmntInd>
<AmdmntInfDtls>
<OrgnlCdtrSchmeId>
<Id>
<PrvtId>
<Othr>
<Id></Id>
</Othr>
</PrvtId>
</Id>
</OrgnlCdtrSchmeId>
</AmdmntInfDtls>
</MndtRltdInf>
<CdtrSchmeId>
<Id>
<PrvtId>
<Othr>
<Id>stuff</Id>
<SchmeNm><Prtry>SEPA</Prtry></SchmeNm>
</Othr>
</PrvtId>
</Id>
</CdtrSchmeId>
</DrctDbtTx>
<Cdtr>
<Nm>stuff</Nm>
</Cdtr>
<CdtrAcct>
<Id>
<IBAN>stuff</IBAN>
</Id>
</CdtrAcct>
<CdtrAgt>
<FinInstnId>
<BIC>stuff</BIC>
</FinInstnId>
</CdtrAgt>
<Dbtr>
<Nm>stuff</Nm>
</Dbtr>
<DbtrAcct>
<Id>
<IBAN>stuff</IBAN>
</Id>
</DbtrAcct>
<DbtrAgt>
<FinInstnId>
<BIC>stuff</BIC>
</FinInstnId>
</DbtrAgt>
<RmtInf>
<Ustrd>Pre-testing SEPA Direct Debits</Ustrd>
</RmtInf>
</DrctDbtTxInf>
</S2SDDDnf:FIToFICstmrDrctDbt>
</S2SDDDnf:MPEDDDnfBlkDirDeb>
And this is the XSD:
<?xml version="1.0" encoding="UTF-8"?>
<!-- STEP2 SDD Schema, MPEDDDnfBlkDirDeb, May 25th 2012, Release November 2012 -->
<!-- STEP2 SDD Shift camt.056 after pacs.003 in sequence and counter, February 25th 2010 -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sw3="urn:iso:std:iso:20022:tech:xsd:pacs.003.001.02" xmlns:sw2="urn:iso:std:iso:20022:tech:xsd:pacs.002.001.03" xmlns:sw6="urn:iso:std:iso:20022:tech:xsd:camt.056.001.01" xmlns:S2SDDDnf="urn:S2SDDDnf:xsd:$MPEDDDnfBlkDirDeb" targetNamespace="urn:S2SDDDnf:xsd:$MPEDDDnfBlkDirDeb" elementFormDefault="qualified">
<xs:import namespace="urn:iso:std:iso:20022:tech:xsd:pacs.003.001.02" schemaLocation="pacs.003.001.02.xsd"/>
<xs:import namespace="urn:iso:std:iso:20022:tech:xsd:pacs.002.001.03" schemaLocation="pacs.002.001.03.xsd"/>
<xs:import namespace="urn:iso:std:iso:20022:tech:xsd:camt.056.001.01" schemaLocation="camt.056.001.01.xsd"/>
<xs:element name="MPEDDDnfBlkDirDeb">
<xs:complexType>
<xs:sequence>
<xs:element name="SndgInst" type="sw3:BICIdentifier"/>
<xs:element name="RcvgInst" type="sw3:BICIdentifier"/>
<!-- changed from SrvcID to SrvcId, Febrary 12 2009 -->
<xs:element name="SrvcId" type="S2SDDDnf:SrvcID"/>
<xs:element name="TstCode" type="S2SDDDnf:TestCodeType"/>
<xs:element name="FType" type="S2SDDDnf:FTpType"/>
<xs:element name="FileRef" type="S2SDDDnf:Max16Text"/>
<xs:element name="FileBusDt" type="sw2:ISODate"/>
<xs:element name="RoutingInd" type="S2SDDDnf:RoutingInd"/>
<xs:element name="FileCycleNo" type="S2SDDDnf:Max2NumericText"/>
<xs:element name="NumDDBlk" type="S2SDDDnf:Max8NumericText"/>
<xs:element name="NumPCRBlk" type="S2SDDDnf:Max8NumericText"/>
<xs:element name="NumREJBlk" type="S2SDDDnf:Max8NumericText"/>
<xs:element name="FIToFICstmrDrctDbt" type="sw3:FIToFICustomerDirectDebitV02" minOccurs="0" maxOccurs="unbounded"/>
<!--camt.056.001.01 replace pacs.006.001.02, January 20th 2010 -->
<xs:element name="FIToFIPmtCxlReq" type="sw6:FIToFIPaymentCancellationRequestV01" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="FIToFIPmtStsRpt" type="sw2:FIToFIPaymentStatusReportV03" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="Max16Text">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9A-Z]{16,16}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="SrvcID">
<xs:restriction base="xs:string">
<xs:enumeration value="COR"/>
<xs:enumeration value="B2B"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="FTpType">
<xs:restriction base="xs:string">
<xs:enumeration value="DNF"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TestCodeType">
<xs:restriction base="xs:string">
<xs:length value="1"/>
<xs:enumeration value="T"/>
<xs:enumeration value="P"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max8NumericText">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]{1,8}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="RoutingInd">
<xs:restriction base="xs:string">
<xs:length value="3" fixed="true"/>
<xs:enumeration value="DIR"/>
<xs:enumeration value="IND"/>
<xs:enumeration value="ALL"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max2NumericText">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]{2,2}"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
And getting this error:
The prefix "S2SDDDnf" for element "S2SDDDnf:MPEDDDnfBlkDirDeb" is not bound. SDDCoreTest18.xml /XMLValidation line 2 XML Problem
Edit
Organize the XSD files in separate folder:
You need to add a definition of the S2SDDDnf alias like so:
<S2SDDDnf:MPEDDDnfBlkDirDeb xmlns = "MPEDDDnfBlkDirDeb.xsd" xmlns:S2SDDDnf="urn:S2SDDDnf:xsd:$MPEDDDnfBlkDirDeb">...</S2SDDDnf:MPEDDDnfBlkDirDeb>
Try creating a XML file referencing the XSD using the New XML File wizard.

use load balancing with wso2esb

I use From Wso2 esb And Load Balancing Concept with sevices, but i have an error this is my code:
<proxy xmlns="http://ws.apache.org/ns/synapse" name="MultiAdd" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence>
<log level="full"/>
<log level="full" category="FATAL"/>
<property xmlns:tem="http://tempuri.org/" name="AParam" expression="//tem:SumSerVise/tem:a" scope="default" type="INTEGER"/>
<property xmlns:tem="http://tempuri.org/" name="BParam" expression="//tem:SumSerVise/tem:b" scope="default" type="INTEGER"/>
<log level="custom">
<property name="AParam" expression="$ctx:AParam"/>
<property name="BParam" expression="$ctx:BParam"/>
</log>
<payloadFactory>
<format>
<p:SumSerVise xmlns:p="http://tempuri.org/">
<!--Exactly 1 occurrence-->
<s:a xmlns:s="http://tempuri.org/">$1</s:a>
<!--Exactly 1 occurrence-->
<s:b xmlns:s="http://tempuri.org/">$2</s:b>
</p:SumSerVise>
</format>
<args>
<arg expression="$ctx:AParam"/>
<arg expression="$ctx:BParam"/>
</args>
</payloadFactory>
<log level="full"/>
<send receive="SeqOne">
<endpoint>
<address uri="http://D-N-PC-12071:8280/services/Add"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<log level="full"/>
<send/>
</outSequence>
</target>
<publishWSDL>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://tempuri.org/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<s:element name="SumSerVise">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="a" type="s:int"/>
<s:element minOccurs="1" maxOccurs="1" name="b" type="s:int"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="SumSerViseResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="SumSerViseResult" type="s:int"/>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="SumSerViseSoapIn">
<wsdl:part name="parameters" element="tns:SumSerVise"/>
</wsdl:message>
<wsdl:message name="SumSerViseSoapOut">
<wsdl:part name="parameters" element="tns:SumSerViseResponse"/>
</wsdl:message>
<wsdl:portType name="ServiceSoap">
<wsdl:operation name="SumSerVise">
<wsdl:input message="tns:SumSerViseSoapIn"/>
<wsdl:output message="tns:SumSerViseSoapOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="SumSerVise">
<soap:operation soapAction="http://tempuri.org/SumSerVise" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="SumSerVise">
<soap12:operation soapAction="http://tempuri.org/SumSerVise" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Service">
<wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">
<soap:address location="http://localhost/SumServices/Service.asmx"/>
</wsdl:port>
<wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
<soap12:address location="http://localhost/SumServices/Service.asmx"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
</publishWSDL>
<description></description>
</proxy>
and this is my sequence:
<sequence xmlns="http://ws.apache.org/ns/synapse" name="SeqOne">
<log level="full"/>
<property xmlns:ns="http://org.apache.synapse/xsd" xmlns:m0="http://tempuri.org/" name="CParam" expression="//m0:SumSerViseResponse/m0:SumSerViseResult" scope="default" type="INTEGER"/>
<log level="custom">
<property xmlns:ns="http://org.apache.synapse/xsd" name="CParam" expression="$ctx:CParam"/>
</log>
<payloadFactory>
<format>
<p:MultiService xmlns:p="http://tempuri.org/">
<!--Exactly 1 occurrence-->
<s:z xmlns:s="http://tempuri.org/">$1</s:z>
</p:MultiService>
</format>
<args>
<arg xmlns:ns="http://org.apache.synapse/xsd" expression="$ctx:CParam"/>
</args>
</payloadFactory>
<log level="full"/>
<send>
<endpoint>
<loadbalance algorithm="org.apache.synapse.endpoints.algorithms.RoundRobin">
<endpoint name="mt">
<address uri="http://D-N-PC-12071:8280/services/MultiService/MultiService"/>
</endpoint>
<endpoint name="KR">
<address uri="http://D-N-PC-12071:8280/services/Multi/MultiService"/>
</endpoint>
</loadbalance>
</endpoint>
</send>
</sequence>
when use load balancing one of services return value 0 and other return correct value
i found my problem was in define endpoint kr and mt that wasnt correct
my parameters in multiservice should be compatible with source
parameters in mt was named "z"
<endpoint name="mt">
<address uri="http://D-N-PC-12071:8280/services/MultiService/MultiService"/>
</endpoint>
but parameters in kr was named "a"
<endpoint name="KR">
<address uri="http://D-N-PC-12071:8280/services/Multi/MultiService"/>
</endpoint>

Error Key properties cannot be empty

Hi all i'm try to deploy a esb project into jboss server 5.1ga
But i got this error
**My Enviroment is
Jboss 5.1 ga,
Jboss Developer Studio 5.0**
Jboss esb 4.11
Riftsaw 2.3.0
17:58:49,155 ERROR [AbstractKernelController] Error installing to Parse: name=vfszip:/D:/jboss-5.1.0.GA/server/default/deploy/Save_Event2.esb/ state=Not Installed mode=Manual requiredState=Parse
org.jboss.deployment.DeploymentException: Key properties cannot be empty
at org.jboss.soa.esb.listeners.deployers.mc.EsbConfigParser.getDependenciesFromDeploymentXml(EsbConfigParser.java:265)
at org.jboss.soa.esb.listeners.deployers.mc.EsbConfigParser.parse(EsbConfigParser.java:170)
at org.jboss.soa.esb.listeners.deployers.mc.EsbConfigParser.parse(EsbConfigParser.java:83)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:239)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:355)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:322)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:294)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:234)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.management.MalformedObjectNameException: Key properties cannot be empty
at javax.management.ObjectName.construct(Unknown Source)
at javax.management.ObjectName.<init>(Unknown Source)
at org.jboss.soa.esb.listeners.deployers.mc.EsbConfigParser.getDependenciesFromDeploymentXml(EsbConfigParser.java:247)
... 38 more
That is error I Got and i'm trying to pass bpel result to esb and back to bpes .
---My deployment.xml-----------------
<?xml version="1.0"?>
<jbossesb-deployment>
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_ esb_reply</depends>
<depends>quickstart_helloworld_Request_esb</depends>
<depends>quickstart_helloworld_Request_gw</depends>
</jbossesb-deployment>
--My jbm-queue-service.xml-----------
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="org.jboss.jms.server.destination.QueueService"
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_esb_reply"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer
</depends>
<depends>jboss.messaging:service=PostOffice</depends>
</mbean>
<mbean code="org.jboss.jms.server.destination.QueueService"
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_esb"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer
</depends>
<depends>jboss.messaging:service=PostOffice</depends>
</mbean>
<mbean code="org.jboss.jms.server.destination.QueueService"
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_gw"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer
</depends>
<depends>jboss.messaging:service=PostOffice</depends>
</mbean>
</server>
----My jboss-esb.xml-----------
<?xml version = "1.0" encoding = "UTF-8"?>
<jbossesb
xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
parameterReloadSecs="5">
<providers>
<jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter dest-type="QUEUE"
dest-name="queue/quickstart_helloworld_Request_gw" />
</jms-bus>
<jms-bus busid="quickstartEsbChannel">
<jms-message-filter dest-type="QUEUE"
dest-name="queue/quickstart_helloworld_Request_esb" />
</jms-bus>
<jms-bus busid="quickstartEsbReplyChannel">
<jms-message-filter dest-type="QUEUE"
dest-name="queue/quickstart_helloworld_Request_esb_reply" />
</jms-bus>
</jms-provider>
<jbr-provider name="JBR-Http-1" protocol="http" host="localhost">
<jbr-bus busid="Http-1" port="8088" />
</jbr-provider>
</providers>
<services>
<service category="FirstServiceESB" name="SimpleListener"
description="Hello World">
<listeners>
<jms-listener name="JMS-Gateway" busidref="quickstartGwChannel"
is-gateway="true" />
<jms-listener name="helloWorld" busidref="quickstartEsbChannel" />
<jbr-listener name="Http-Gateway" busidref="Http-1"
is-gateway="true" />
</listeners>
<actions mep="RequestResponse">
<action name="action1"
class="MyJMSListenerAction"
process="displayMessage" />
<!--
<action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln">
<property name="printfull" value="false" />
</action>
The next action is for Continuous Integration testing
<action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore" />
-->
</actions>
</service>
</services>
</jbossesb>
Any help Appreciated.
Best Regards,
Pradeep.
If you look at the stacktrace of the error you can see that the error is a MalformedObjectNameException coming from EsbConfigParser:
org.jboss.soa.esb.listeners.deployers.mc.EsbConfigParser.getDependenciesFromDeploymentXml(EsbConfigParser.java:247)
The method name where the error is thrown is
getDependenciesFromDeploymentXml
So it looks like the problem is in the deployment xml.
Now we can confirm this by looking at the source code of the class (https://www.java2s.com/Open-Source/Java/JBoss/jbossesb-4.7/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParser.java.htm) and see that it is doing this:
Iterator depends = MetaData.getChildrenByTagName(jboss, "depends");
if (depends != null)
{
while (depends.hasNext())
{
Element depend = (Element) depends.next();
dependencies.add(new ObjectName(MetaData.getElementContent(depend)));
}
}
And then if we look at your deployment.xml above there is indeed an element that looks invalid:
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_ esb_reply</depends>
"quickstart_helloworld_Request_ esb_reply" should not have a space between "Request_" and "esb_reply".
Change it to "quickstart_helloworld_Request_esb_reply".