Skip to content

Instantly share code, notes, and snippets.

View hasithaa's full-sized avatar
🏠
Working from home

Hasitha Aravinda hasithaa

🏠
Working from home
View GitHub Profile
@hasithaa
hasithaa / Deadline.xml
Created May 21, 2013 16:42
Modifying WSO2 BPS Claims Approval Task Sample for Escalation and deadline. Sample URL: http://docs.wso2.org/wiki/display/BPS300/Claims+Approval+Task+Sample
<htd:task name="ApproveClaim">
<!-- Task definition is here -->
<htd:deadlines>
<htd:startDeadline name="sendNotifications">
<htd:documentation xml:lang="en-US">
if the claimed amount is less than 10000 and not started within 5 minutes, escalation notifications are sent
-to the task's potential owners.
</htd:documentation>
<htd:for>PT5M</htd:for>
<htd:escalation name="reminder">
@hasithaa
hasithaa / SimpleEventListener.java
Last active December 17, 2015 17:49
Sample HumanTask Event Listener for WSO2 BPS
package org.wso2.carbon.humantask.sample;
import org.wso2.carbon.humantask.core.api.event.HumanTaskEventListener;
import org.wso2.carbon.humantask.core.api.event.TaskEventInfo;
import org.wso2.carbon.humantask.core.dao.TaskType;
public class SimpleEventListener implements HumanTaskEventListener {
@Override
public void onEvent(TaskEventInfo taskEventInfo) {
@hasithaa
hasithaa / humantask.xml
Created May 25, 2013 15:47
Configuring HumanTask engine for a custom Task Event Listener.
<TaskEventListeners>
<ClassName>org.wso2.carbon.humantask.sample.SampleEventListener</ClassName>
</TaskEventListeners>
@hasithaa
hasithaa / EchoProxy.xml
Last active December 19, 2015 04:09
WSO2 ESB Echo Proxy: This is a sample proxy service that invokes WSO2 ESB echo service.
<proxy xmlns="http://ws.apache.org/ns/synapse" name="EchoProxy" transports="https,http" statistics="disable"
trace="disable" startOnLoad="true">
<target>
<inSequence>
<!--logging incoming message -->
<log level="custom">
<property name="ProxyInvoked" value=" -------yes-----"/>
</log>
<log level="full"/>
<!-- invoking echo service -->
import com.eviware.soapui.support.GroovyUtils
import com.eviware.soapui.support.types.StringToObjectMap
import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep
def groovyUtils = new GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( mockRequest.requestContent )
def map = new StringToObjectMap()
holder.declareNamespace("wsa","http://www.w3.org/2005/08/addressing")
holder.declareNamespace("ech","http://www.example.org/EchoService/")
<?xml version="1.0" encoding="UTF-8"?>
<bpel:process name="soapHeaderTestProcess" targetNamespace="http://wso2.org/bps/sample"
suppressJoinFailure="yes" xmlns:tns="http://wso2.org/bps/sample"
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
<bpel:import location="soapHeaderTestProcessArtifacts.wsdl"
namespace="http://wso2.org/bps/sample" importType="http://schemas.xmlsoap.org/wsdl/" />
<bpel:partnerLinks>
<bpel:partnerLink name="client" partnerLinkType="tns:soapHeaderTestProcess"
<bpel:copy>
<bpel:from variable="input" header="echo"></bpel:from>
<bpel:to part="payload" variable="output">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
</bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from>
<bpel:literal>
<eh2:echo2 xmlns:eh2="http://anotherexample.com">noValueDefined</eh2:echo2>
</bpel:literal>
</bpel:from>
<bpel:to header="echo2" variable="output"></bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from part="payload" variable="input">
<bpel:copy>
<bpel:from header="echo" variable="input"></bpel:from>
<bpel:to header="echo" variable="output"></bpel:to>
</bpel:copy>
<plugins>
<!-- usage of jax-ws maven plugin-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<id>wsimport-from-jdk</id>
<goals>