Monday, March 16, 2015

Integrasi Radar Chart (Chart.js) dengan Primefaces

Beberapa waktu yang lalu saat mengerjakan project on-site, tim kami diminta untuk me-modernisasikan sistem dokumen report yg sudah ada menjadi sebuah aplikasi web yang nantinya dapat di integrasikan ke dalam portal internal client. Dokumen report yg sudah ada saat ini dibuat dengan Microsoft Excel, dimana dokumen ini memperlihatkan rekap data beserta total per kelompok barang menggunakan radar chart.

Tantangannya adalah tim harus menggunakan Primefaces karena karena sistem portal yang sudah ada saat ini dibangun dengan menggunakan Primefaces sementara Primefaces sendiri tidak menyediakan component Radar Chart.

Saya memutuskan untuk menggunakan Chart.js (http://www.chartjs.org/docs/#radar-chart) dimana library javascript ini sudah mem-fasilitasi untuk dapat membuat radar chart. Saya akan coba sharing cara mengintegrasikannya dengan Primefaces.

Kita akan membuat membuat aplikasi sederhana yang menyajikan kepada user summary penjualan tahunan per tiga-bulan, dalam bentuk tabel dan radar chart.

Mari kita mulai dengan membuat contoh data:


Untuk membuat contoh data diatas anda dapat membuat JUnit test sederhana seperti berikut:

 public class AppTest extends TestCase {  
   public AppTest(String testName){  
     super( testName );    
   }  

   public static Test suite() {  
     return new TestSuite( AppTest.class );    
   }  

   private static SessionFactory factory;    
   private static Session session;  

   private static double generateRandomAmount() {  
     return ((double)new Random().nextInt(500))/  
         (new Random().nextInt(1) == 0 ? 2 : 3);    
   }  

   public void testApp() {  
     try {  
       factory = new AnnotationConfiguration()  
           .configure()  
           .addPackage("com.nostratech.model")  
           .addAnnotatedClass(QuarterlySales.class)  
           .buildSessionFactory();      
     } catch (Throwable ex) {  
       System.err.println("Failed to create sessionFactory object." + ex);  
       throw new ExceptionInInitializerError(ex);      
     }  

     Session session = factory.openSession();      
     Transaction tx = null;      

     try{  
       tx = session.beginTransaction();  

       QuarterlySales[] sales = new QuarterlySales[] {  
         new QuarterlySales("Rice"),          
         new QuarterlySales("Vegetable"),          
         new QuarterlySales("Fruit"),          
         new QuarterlySales("Snack"),          
         new QuarterlySales("Ketchup"),          
         new QuarterlySales("Milk")  
       };  

       for (QuarterlySales sale : sales) {  
         sale.setAmountQ1(generateRandomAmount());          
         sale.setAmountQ2(generateRandomAmount());          
         sale.setAmountQ3(generateRandomAmount());          
         sale.setAmountQ4(generateRandomAmount());  
         session.save(sale);        
       }  

       assert session.createCriteria(QuarterlySales.class).list().size() > 0;  

       tx.commit();      

      } catch (HibernateException e) {  
       if (tx!=null) tx.rollback();        
       e.printStackTrace();      
     } finally {  
       session.close();      
     }  
   }  
 }  

Dimana entity QuarterlySales adalah sebagai berikut:

 @Entity  
 public class QuarterlySales {  
   @Id  
   @GeneratedValue(strategy = GenerationType.AUTO)  
   private Long id;  

   private String item;  
   private double amountQ1;    
   private double amountQ2;    
   private double amountQ3;    
   private double amountQ4;  

   public QuarterlySales() {  
   }  

   public QuarterlySales(String item) {  
     this.item = item;    
   }  
   public String getItem() {  
     return item;    
   }  
   public void setItem(String item) {  
     this.item = item;    
   }  
   public double getAmountQ1() {  
     return amountQ1;    
   }  
   public void setAmountQ1(double amountQ1) {  
     this.amountQ1 = amountQ1;    
   }  
   public double getAmountQ2() {  
     return amountQ2;    
   }  
   public void setAmountQ2(double amountQ2) {  
     this.amountQ2 = amountQ2;    
   }  
   public double getAmountQ3() {  
     return amountQ3;    
   }  
   public void setAmountQ3(double amountQ3) {  
     this.amountQ3 = amountQ3;    
   }  
   public double getAmountQ4() {  
     return amountQ4;    
   }  
   public void setAmountQ4(double amountQ4) {  
     this.amountQ4 = amountQ4;    
   }  
 }  

Jika anda perhatikan, saya menggunakan Hibernate sebagai ORM nya. Berikut konfigurasi hibernate yang saya gunakan:

 <?xml version="1.0" encoding="utf-8"?>  
     <!DOCTYPE hibernate-configuration SYSTEM  
         "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">  
 <hibernate-configuration>  
   <session-factory>  
     <property name="hibernate.dialect">  
       org.hibernate.dialect.MySQLDialect  
     </property>  
     <property name="hibernate.connection.driver_class">  
       com.mysql.jdbc.Driver  
     </property>  
     <property name="hibernate.connection.url">  
       jdbc:mysql://localhost:8889/nostra_db  
     </property>  
     <property name="hibernate.connection.username">  
       root  
     </property>  
     <property name="hibernate.connection.password">  
       root  
     </property>  
     <property name="show_sql">true</property>  
     <property name="hbm2ddl.auto">create</property>  
   </session-factory>  
 </hibernate-configuration>  

Sebelum kita integrasikan Chart.js mari terlebih dahulu kita membuat UI untuk menampilkan data yang sudah kita buat sebelumnya dengan menggunakan Primefaces datatable

 <?xml version="1.0" encoding="UTF-8"?>  
 <!DOCTYPE html>  
 <html xmlns="http://www.w3.org/1999/xhtml"  
    xmlns:h="http://java.sun.com/jsf/html"  
    xmlns:p="http://primefaces.org/ui">  
 <h:head>  
 </h:head>  
 <h:body>  
   <h:form>  
     <p:commandButton value="Show Data"  
              actionListener="#{radarChartBean.search}"  
              update="tbl"  
              oncomplete="fetchChartData()"/>  
     <br/>  
     <br/>  
     <p:dataTable id="tbl" value="#{radarChartBean.data}" var="model">  
       <p:column headerText="Item">  
         <h:outputText value="#{model.item}"/>  
       </p:column>  
       <p:column headerText="Q1">  
         <h:outputText value="#{model.amountQ1}"/>  
       </p:column>  
       <p:column headerText="Q2">  
         <h:outputText value="#{model.amountQ2}"/>  
       </p:column>  
       <p:column headerText="Q3">  
         <h:outputText value="#{model.amountQ3}"/>  
       </p:column>  
       <p:column headerText="Q4">  
         <h:outputText value="#{model.amountQ4}"/>  
       </p:column>  
     </p:dataTable>  
   </h:form>  
 </h:body>  
 </html>  

Managed Bean sebagai controller. Untuk demo ini, saya menggunakan @ViewScoped karena data untuk untuk radar (akan dijelaskan selebihnya nanti...) dapat merentang lebih dari satu HTTP Request. Namun demikian, anda bebas untuk mengatur ulang organisasi kodenya agar tidak memerlukan @ViewScoped (saya tinggalkan sebagai latihan...)

 @ManagedBean  
 @ViewScoped  
 public class RadarChartBean {  
   private List<QuarterlySales> data;  
   private RadarChartService service;  
   
   @PostConstruct  
   public void init() {  
     service = new RadarChartService();  
   }  
   
   public void search() {  
     data = service.getData();  
   }
  
   public List<QuarterlySales> getData() {  
     return data;  
   }  
 }  

Untuk mengambil data dengan hibernate kita buat class baru RadarChartService. Disini kita lakukan logical partitioning pada aplikasi sesuai fungsi sehingga mudah dimengerti.

 public class RadarChartService {  
   private SessionFactory factory;  
   private Session session;  
   public RadarChartService() {  
     factory = new AnnotationConfiguration()  
         .configure()  
         .addPackage("com.nostratech.model")  
         .addAnnotatedClass(QuarterlySales.class)  
         .buildSessionFactory();  
     session = factory.openSession();  
   }  
   public List<QuarterlySales> getData() {  
     return session.createCriteria(QuarterlySales.class).list();  
   }  
 }  

Struktur aplikasi kurang lebih menjadi seperti berikut:


Saat anda jalankan, maka tampilan aplikasi kita untuk sementara akan menjadi seperti di bawah:


Mari selanjutnya kita tambahkan radar chart untuk me-representasikan data dari table tersebut.

Chart.js mengharapkan format data dalam bentuk JSON seperti contoh di bawah (saya ambil dari dokumentasi Chart.js: http://www.chartjs.org/docs/#radar-chart):

 var data = {  
   labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"],  
   datasets: [  
     {  
       label: "My First dataset",  
       fillColor: "rgba(220,220,220,0.2)",  
       strokeColor: "rgba(220,220,220,1)",  
       pointColor: "rgba(220,220,220,1)",  
       pointStrokeColor: "#fff",  
       pointHighlightFill: "#fff",  
       pointHighlightStroke: "rgba(220,220,220,1)",  
       data: [65, 59, 90, 81, 56, 55, 40]  
     },  
     {  
       label: "My Second dataset",  
       fillColor: "rgba(151,187,205,0.2)",  
       strokeColor: "rgba(151,187,205,1)",  
       pointColor: "rgba(151,187,205,1)",  
       pointStrokeColor: "#fff",  
       pointHighlightFill: "#fff",  
       pointHighlightStroke: "rgba(151,187,205,1)",  
       data: [28, 48, 40, 19, 96, 27, 100]  
     }  
   ]  
 };  

Pada kasus kita, labels akan menjadi:

labels: ["Rice",  "Vegetable", "Fruit", "Snack", "Ketchup", "Milk"]

untuk masing-masing item. Dan datasets merupakan data sales (Q1, Q2, Q3, dan Q4) masing-masing item mengikuti urutan labels. Contoh:

datasets: {
    {
        label: "Q1",
        fillColor: "rgba(120, 120, 120, 1)",
        ....
        ....
        data: [75, 43, 80, 120, 20, 55, 310],
    },
    {
        label: "Q2",
        ....
        ....

Untuk membantu kita membuat data JSON dengan format seperti di atas, buat sebuah View Object seperti berikut:

 public class VoRadarDataset {  
   private static final DecimalFormat df = new DecimalFormat("###.#");  
   private static VoRadarDataset[] dataset = new VoRadarDataset[] {  
       new VoRadarDataset("Q1", "rgba(192, 80, 77, 0.2)", "rgba(192, 80, 77, 1)"),  
       new VoRadarDataset("Q2", "rgba(155, 187, 89, 0.2)", "rgba(155, 187, 89, 1)"),  
       new VoRadarDataset("Q3", "rgba(187, 174, 45, 0.2)", "rgba(187, 174, 45, 1)"),  
       new VoRadarDataset("Q4", "rgba(85, 134, 191, 0.2)", "rgba(85, 134, 191, 1)")  
   };  
   public static void resetData() {  
     for (int i = 0; i < dataset.length; ++i) {  
       dataset[i].data = null;  
       dataset[i].data = new ArrayList<String>();  
     }  
   }  
   public static void addData(int i, double d) {  
     dataset[i].data.add(df.format(d));  
   }  
   public static void addDataQ1(double d) {  
     addData(0, d);  
   }  
   public static void addDataQ2(double d) {  
     addData(1, d);  
   }  
   public static void addDataQ3(double d) {  
     addData(2, d);  
   }  
   public static void addDataQ4(double d) {  
     addData(3, d);  
   }  
   public static VoRadarDataset[] get() {  
     return dataset;  
   }  
   private final String pointStrokeColor = "#fff";  
   private final String pointHighlightFill = "#fff";  
   private String label;  
   private String fillColor;  
   private String strokeColor;  
   private String pointColor;  
   private String pointHighlightStroke;  
   private List<String> data;  
   private VoRadarDataset(String label, String fillColor, String strokeColor) {  
     this.label = label;  
     this.fillColor = fillColor;  
     this.strokeColor = strokeColor;  
     this.pointColor = strokeColor;  
     this.pointHighlightStroke = strokeColor;  
     this.data = new ArrayList<String>();  
   }  
   public String getPointHighlightFill() {  
     return pointHighlightFill;  
   }  
   public String getPointHighlightStroke() {  
     return pointHighlightStroke;  
   }  
   public String getPointStrokeColor() {  
     return pointStrokeColor;  
   }  
   public String getLabel() {  
     return label;  
   }  
   public String getFillColor() {  
     return fillColor;  
   }  
   public String getStrokeColor() {  
     return strokeColor;  
   }  
   public String getPointColor() {  
     return pointColor;  
   }  
   public List<String> getData() {  
     return data;  
   }  
 }  

Kita akan lihat bagaimana cara menggunakan class ini nanti, sekarang mari kita tambahkan placeholder untuk Radar Chart, posisikan tepat di bawah table:

 </p:dataTable>  
     <div style="margin: 10px">  
       <canvas id="radar" width="400" height="400"></canvas>  
       <div id="radarLegend" style="width: 400px;"></div>  
     </div>  

Tambahkan kode javascript untuk membuat radar chart:

 <script>  
       //<![CDATA[  
       var chart = null;  
       function createRadarChart(data) {  
         var ctx = $("#radar")[0].getContext("2d");  
         chart = new Chart(ctx).Radar(data, {  
           legendTemplate: '' +  
           '<ul style="width: 230px; margin: 0 auto;">' +  
           '  <% for (var i=0; i<datasets.length; i++){ %>' +  
           '  <li style="float: left; margin-left: 30px; color: <%= datasets[i].strokeColor %>">' +  
           '    <span style="color: #333; font-family: Arial; font-size: 0.8em;">' +  
           '      <%= datasets[i].label %>' +  
           '    </span>' +  
           '  </li>' +  
           '  <% } %>' +  
           '</ul>'  
         });  
         $("#radarLegend").html(chart.generateLegend());  
       }  
       function stringFromChars(chars) {  
         var s = "";  
         for(var i=0; i<chars.length; i++) {  
           s += String.fromCharCode(chars[i]);  
         }  
         return s;  
       }  
       function parseLabels(chartData) {  
         var labels = [];  
         for(var i=0; i<chartData.labels.length; i++) {  
           var chars = chartData.labels[i].label;  
           labels.push(stringFromChars(chars));  
         }  
         return labels;  
       }  
       function doCreateRadarChart(xhr, status, args) {  
         if (chart) {  
           chart.destroy();  
           $("#radarLegend").html('');  
         }  
         if (args.chartData) {  
           var chartData = args.chartData;  
           chartData.labels = parseLabels(chartData);  
           createRadarChart(chartData);  
         }  
       }  
       //]]>  
     </script>  

dan tentunya tambahkan referensi ke Chart.js

 <h:head>  
   <script src="js/Chart.min.js" type="text/javascript"/>  
 </h:head>  

Kita akan menggunakan button "Show Data" sebegai trigger untuk menampilkan chart. Untuk itu, tambahkan event oncomplete pada button tersebut:

 <p:commandButton value="Show Data"  
              actionListener="#{radarChartBean.search}"  
              update="tbl"  
              oncomplete="fetchChartData()"/>  

Lalu apakah fungsi fetchChartData() ini ?. Fungsi ini di buat dengan menggunakan component Primefaces yang bernama remoteCommand. remoteCommand ini digunakan untuk memanggil method pada managed bean guna menyiapkan data untuk membuat radar chart.

Kita dapat men-declare nya seperti berikut (anda dapat meletakkannya dimana saja selama masih di dalam <h:form>


 <p:remoteCommand name="fetchChartData"  
              action="#{radarChartBean.prepareChartData}"  
              oncomplete="doCreateRadarChart(xhr, status, args);"/>  

Berikut adalah method prepareChartData() pada managed bean:

 public void prepareChartData() {  
     RequestContext reqCtx = RequestContext.getCurrentInstance();  
     reqCtx.addCallbackParam("chartData", radarChartData);  
   }  

radarChartData adalah instance dari class RadarChartData pada managed bean yang saya gunakan sebagai helper untuk membentuk data dengan format seperti yang di harapkan oleh ChartJS. class RadarChartData juga menggunakan VoRadarDataset yang kita buat sebelumnya untuk membentuk "datasets".

 public static class RadarChartData {  
     private List<LabelWrapper> labels;  
     private VoRadarDataset[] datasets;  
     public RadarChartData() {  
       labels = new ArrayList<LabelWrapper>();  
     }  
     public void addLabel(String label) {  
       labels.add(new LabelWrapper(label));  
     }  
     public List<LabelWrapper> getLabels() {  
       return labels;  
     }  
     public VoRadarDataset[] getDatasets() {  
       return datasets;  
     }  
     public void setDatasets(VoRadarDataset[] datasets) {  
       this.datasets = datasets;  
     }  
     public static class LabelWrapper {  
       private byte[] label;  
       public LabelWrapper(String label) {  
         this.label = label.getBytes();  
       }  
       public byte[] getLabel() {  
         return label;  
       }  
     }  
   }  

Jika anda perhatikan dengan seksama, saya tidak melakukan apapun untuk mengembalikan data ke UI dalam format JSON. Ini karena method addCallbackParam(), akan otomatis meng-convert POJO (dalam kasus ini object dari RadarChartData) ke dalam format JSON.

Lakukan initialisasi pada method search() sebagai berikut:

 public void search() {  
     data = service.getData();  
     prepareChartData(data);  
   }  
   public List<QuarterlySales> getData() {  
     return data;  
   }  
   private void prepareChartData(List<QuarterlySales> radarData) {  
     if (radarData != null && radarData.size() > 0) {  
       VoRadarDataset.resetData();  
       radarChartData = new RadarChartData();  
       for (int i = 0; i < radarData.size(); ++i) {  
         radarChartData.addLabel(radarData.get(i).getItem());  
         VoRadarDataset.addDataQ1(radarData.get(i).getAmountQ1());  
         VoRadarDataset.addDataQ2(radarData.get(i).getAmountQ2());  
         VoRadarDataset.addDataQ3(radarData.get(i).getAmountQ3());  
         VoRadarDataset.addDataQ4(radarData.get(i).getAmountQ4());  
       }  
       radarChartData.setDatasets(VoRadarDataset.get());  
     }  
   }  

Struktur final aplikasi:


Sekian cara mengintegrasikan Chart.js dengan Primefaces. Please share jika anda mempunyai solusi yang mirip atau bahkan lebih baik dari cara yang saya gunakan disini. :)


Terima kasih, semoga bermanfaat !


Sunday, March 15, 2015

Parameterized Bounded Task Flow


Melanjutkan blog saya sebelumnya tentang task flow, kali ini saya akan memberikan contoh pembuatan Bounded Task Flow sederhana yang menerima input parameter. Bounded task flow dapat di-reuse di berbagai project ADF lain. Biasanya kita memerlukan input parameter untuk task flow tersebut, baik terkait Business Process atau keperluan lain di aplikasi. Dalam contoh ini, Input Parameter akan diterima oleh Task Flow, kemudian ditampilkan ke halaman .jspx. Kasus lebih kompleks dapat anda kembangkan dari sample ini.

1. Buat Project ADF di JDeveloper, lalu New -> ADF Task Flow untuk membuat task flow baru dalam project anda.


2. Masukkan nama Task Flow anda, lalu jangan lupa untuk men-check pilihan Create as Bounded Task Flow agar task flow yang dihasilkan adalah bounded task flow.


3. Task Flow Diagram akan terbuka, masukkan 1 komponen View. Beri nama View tersebut sesuai kebutuhan anda, lalu double click view tersebut untuk membuat Page Implementation-nya.


4. Dalam page di View tersebut, saya membuat 1 component OutputText saja. Nantinya ini akan digunakan untuk menampilkan input parameter yang diberikan pada task flow.


5. Buka kembali task flow .xml, buka Overview -> Parameters. Disini kita dapat menambah/mengurangi parameter yang akan masuk ke dalam task flow beserta tipenya. Kita juga dapat menentukan apakah parameter tersebut Required ketika task flow dipanggil. Dalam contoh ini, saya akan membuat 1 parameter Required yaitu inputParameter1 dengan tipe String.


6. Klik View1 yang kita buat di langkah ketiga. Cek Property Inspector -> Page Parameters. Disini kita dapat menentukan kemana input parameter akan disimpan/di-reuse dalam aplikasi. Dalam contoh ini, saya menyimpan inputParameter1 (step 5) ke dalam variabel Page Flow Scope yang bernama label1Val. Nantinya variabel ini dapat diakses oleh komponen dalam task flow untuk diproses lebih jauh.


7. Buka Page Fragment yang kita buat di step 4. Klik komponen Input Text -> Property Inspector -> Value. Masukkan value #{pageFlowScope. label1Val}. Ini merupakan variable tempat kita menyimpan value dari input parameter (step 6). Nantinya value ini akan ditampilkan oleh Input Text tersebut ketika page di-load oleh browser.


8. Untuk testing task flow kita, buat sebuah page jsf kosong. Dalam page tersebut, drag Bounded Task Flow yang kita buat. Kita akan diminta untuk memasukkan value dari inputParameter1 karena parameter tersebut kita tentukan sebagai Required (step 5). Dalam contoh ini, saya memasukkan value testVal sebagai parameter.


9. Run aplikasi anda, maka Label yang kita buat harusnya akan menampilkan testVal, sesuai dengan input yang kita specify di step 8


Sekian blog kali ini. Semoga membantu.

Human Workflow Web Services Part 2

Pada kesempatan sebelumnya kita sudah bermain dengan membuat kostum worklist untuk mendapatkan list task yang ada pada dashboard kita. Sekarang kita akan bermain dengan TaskService. TaskService dipakai untuk melakukan update pada payload, menambah attachment, menambah comment, merubah output dan banyak lagi. Kali ini kita akan mencoba untuk mengambil salah satu task yang sudah kita dapatkan dari part1 kemudian kita ubah payload nya dan kita ubah outcome nya.
  1. Pertama tama kita harus mendapatkan taskId dari salah satu task yang ingin kita ubah payload & outcome nya. Tentunya dari part 1 kita ingat bahwa respon dari queryTask berupa title, taskNumber, taskId, dan priority, maka taskId inilah yang akan kita pakai nanti.
  2. Setelah tau taskId dari task yang akan kita edit, kita gunakan operasi acquireTask untuk mengunci task tersebut agar tidak bisa di edit oleh user lain. Contoh :
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tas="http://xmlns.oracle.com/bpel/workflow/taskService" xmlns:com="http://xmlns.oracle.com/bpel/workflow/common" xmlns:task="http://xmlns.oracle.com/bpel/workflow/task" xmlns:tas1="http://xmlns.oracle.com/bpel/workflow/TaskEvidenceService"> <soapenv:Header/> <soapenv:Body> <tas:acquireTask> <!--Optional:--> <com:workflowContext> <com:credential> <com:login>yuki</com:login> <com:password>welcome1</com:password> </com:credential> </com:workflowContext> <tas:taskId>ce34ebe9-703d-4170-ac39-76fb9d141037</tas:taskId> </tas:acquireTask> </soapenv:Body> </soapenv:Envelope>
  3. Response dari request diatas akan berupa payload element yang type nya berupa anyType dan berisi human task payload yang telah di konfig dalam proses workflow nya.
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> <task xmlns="http://xmlns.oracle.com/bpel/workflow/task"> <title>BpmFlow</title> <payload> <input xmlns="http://www.nostratech.com/input/type"> <name>hendra edit via WebService</name> <address>harapan indah edit via WebService</address> </input> </payload> <taskDefinitionURI>TelkomHIE/BpmFlow!1.1/Humantask2</taskDefinitionURI> <creator>andre</creator> <ownerRole>BpmFlow.ProcessOwner</ownerRole> <priority>3</priority> <identityContext>jazn.com</identityContext> <processInfo> <instanceId>60095</instanceId> <processId>BPMFlowProcess</processId> <processName>BPMFlowProcess</processName> </processInfo> <systemAttributes> <approvalDuration>1312539</approvalDuration> <approvers>yuki</approvers> <assignedDate>2015-03-16T11:40:12+07:00</assignedDate> <createdDate>2015-03-16T11:40:12+07:00</createdDate> <digitalSignatureRequired>false</digitalSignatureRequired> <endDate>2015-03-16T12:02:04.539+07:00</endDate> <hasSubTasks>false</hasSubTasks> <inShortHistory>true</inShortHistory> <isGroup>true</isGroup> <numberOfTimesModified>5</numberOfTimesModified> <outcome>APPROVE</outcome> <passwordRequiredOnUpdate>false</passwordRequiredOnUpdate> <pushbackSequence>INITIAL_ASSIGNEES;1-5</pushbackSequence> <secureNotifications>false</secureNotifications> <state>COMPLETED</state> <taskId>ce34ebe9-703d-4170-ac39-76fb9d141037</taskId> <taskNumber>200101</taskNumber> <updatedBy> <id>yuki</id> <displayName>yuki</displayName> <type>user</type> </updatedBy> <updatedDate>2015-03-16T12:02:04+07:00</updatedDate> <version>5</version> <versionReason>TASK_VERSION_REASON_COMPLETED</versionReason> <taskDefinitionId>TelkomHIE/BpmFlow!1.1/Humantask2</taskDefinitionId> <taskDefinitionName>Humantask2</taskDefinitionName> <workflowPattern>Participant</workflowPattern> <isTestTask>false</isTestTask> <participantName>default.DefaultPerformer</participantName> <rootTaskId>ce34ebe9-703d-4170-ac39-76fb9d141037</rootTaskId> <systemStringActions>PUSH_BACK,sharePayload</systemStringActions> <isTemplateTask>false</isTemplateTask> <taskNamespace>http://xmlns.oracle.com/BPMFlow/BpmFlow/Humantask2</taskNamespace> <timers/> <componentType>Workflow</componentType> <activityName>UserTask1</activityName> <activityId>ACT12343189529316</activityId> <thread>0</thread> <parentThread>-1</parentThread> <swimlaneRole>FlowDua</swimlaneRole> <timersSuspended>false</timersSuspended> <tenantIdNumber>-1</tenantIdNumber> <isDecomposedTask>false</isDecomposedTask> <formName>default</formName> </systemAttributes> <systemMessageAttributes> <numberAttribute1>0.0</numberAttribute1> <numberAttribute2>0.0</numberAttribute2> <numberAttribute3>0.0</numberAttribute3> <numberAttribute4>0.0</numberAttribute4> <numberAttribute5>0.0</numberAttribute5> <numberAttribute6>0.0</numberAttribute6> <numberAttribute7>0.0</numberAttribute7> <numberAttribute8>0.0</numberAttribute8> <numberAttribute9>0.0</numberAttribute9> <numberAttribute10>0.0</numberAttribute10> <protectedNumberAttribute1>0.0</protectedNumberAttribute1> <protectedNumberAttribute2>0.0</protectedNumberAttribute2> <protectedNumberAttribute3>0.0</protectedNumberAttribute3> <protectedNumberAttribute4>0.0</protectedNumberAttribute4> <protectedNumberAttribute5>0.0</protectedNumberAttribute5> <protectedNumberAttribute6>0.0</protectedNumberAttribute6> <protectedNumberAttribute7>0.0</protectedNumberAttribute7> <protectedNumberAttribute8>0.0</protectedNumberAttribute8> <protectedNumberAttribute9>0.0</protectedNumberAttribute9> <protectedNumberAttribute10>0.0</protectedNumberAttribute10> </systemMessageAttributes> <callback> <id>BPMFlowProcess/HumanTasks.Humantask2.reference</id> <converstationId>urn:883fe82e-cb96-11e4-aec4-6ac578b5c089</converstationId> </callback> <isPublic>false</isPublic> <percentageComplete>100.0</percentageComplete> <sca> <applicationName>TelkomHIE</applicationName> <componentName>Humantask2</componentName> <compositeDN>TelkomHIE/BpmFlow!1.1*soa_d5fea338-73b5-41f6-8e7c-51413d395e62</compositeDN> <compositeInstanceId>60032</compositeInstanceId> <compositeName>BpmFlow</compositeName> <compositeVersion>1.1</compositeVersion> <ecId>8986bff4-3cbf-4a5b-8f08-6f0326c294a8-0000b6d6</ecId> <parentComponentInstanceId>bpmn:60095</parentComponentInstanceId> <parentComponentInstanceRefId>60095-ACT12343189529316-BPMFlowProcess_try.3-1</parentComponentInstanceRefId> <headerProperties>rO0ABXNyABFqYXZhLnV0aWwuSGFzaE1hcAUH2sHDFmDRAwACRgAKbG9hZEZhY3RvckkACXRocmVzaG9sZHhwP0AAAAAAABh3CAAAACAAAAAPdAAddHJhY2tpbmcuQ29tcG9zaXRlU0NBRW50aXR5SWR0AAU2MDAwMXQAFHRyYWNraW5nLlNDQUVudGl0eUlkdAAFNjAwMDR0ABp0cmFja2luZy5Db3JyZWxhdGlvbkZsb3dJZHQAIjAwMDBLa1dzUnNXRjRFV0ZMekZTOEExS3pJQmgwMDAwMTZ0ABl0cmFja2luZy5yZXNwb25zZS5jb250ZXh0c3IAJmphdmEudXRpbC5jb25jdXJyZW50LkNvbmN1cnJlbnRIYXNoTWFwZJneEp2HKT0DAANJAAtzZWdtZW50TWFza0kADHNlZ21lbnRTaGlmdFsACHNlZ21lbnRzd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eCreatedTime>2015-03-16T11:40:07.455+07:00</compositeCreatedTime> <componentInstanceId>60096</componentInstanceId> <flowId>60026</flowId> <scaPartitionId>60</scaPartitionId> </sca> <applicationContext>OracleBPMProcessRolesApp</applicationContext> <taskDefinitionId>TelkomHIE/BpmFlow!1.1/Humantask2</taskDefinitionId> <correlationId>ce34ebe9-703d-4170-ac39-76fb9d141037</correlationId> <mdsLabel>soa_cf_ed1f0f6f-b93c-4b73-b1f2-f63584182e50</mdsLabel> <customAttributes> <customAttributeNumber1>0.0</customAttributeNumber1> <customAttributeNumber2>0.0</customAttributeNumber2> </customAttributes> </task> </env:Body> </env:Envelope>
  4. Sekarang kita telah tau format payload serta isi task nya. Selanjutnya kita bisa merubah isi payload nya. Untuk mempermudah kalian bisa mengcopy isi tag <task> kemudian kita buka operation updateTask pada TaskService. Pada updateTask akan berisi tentang informasi task itu sendiri. Kita paste isi tag <task> yang sudah kita copy dan kita timpa ke tag <task> yang sudah ada.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tas="http://xmlns.oracle.com/bpel/workflow/taskService" xmlns:com="http://xmlns.oracle.com/bpel/workflow/common" xmlns:task="http://xmlns.oracle.com/bpel/workflow/task" xmlns:tas1="http://xmlns.oracle.com/bpel/workflow/TaskEvidenceService"> <soapenv:Header/> <soapenv:Body> <tas:updateTask> <com:workflowContext> <com:credential> <com:login>yuki</com:login> <com:password>welcome1</com:password> </com:credential> </com:workflowContext> <task xmlns="http://xmlns.oracle.com/bpel/workflow/task"> <title>BpmFlow</title> <payload> <input xmlns="http://www.nostratech.com/input/type"> <name>hendra edit via WebService</name> <address>harapan indah edit via WebService</address> </input> </payload> <taskDefinitionURI>TelkomHIE/BpmFlow!1.1/Humantask2</taskDefinitionURI> <creator>andre</creator> <ownerRole>BpmFlow.ProcessOwner</ownerRole> <priority>3</priority> <identityContext>jazn.com</identityContext> <processInfo> <instanceId>60095</instanceId> <processId>BPMFlowProcess</processId> <processName>BPMFlowProcess</processName> </processInfo> <systemAttributes> <acquiredBy>yuki</acquiredBy> <assignedDate>2015-03-16T11:40:13+07:00</assignedDate> <createdDate>2015-03-16T11:40:12+07:00</createdDate> <digitalSignatureRequired>false</digitalSignatureRequired> <fromUser> <id>andre</id> <displayName>andre</displayName> <type>user</type> </fromUser> <hasSubTasks>false</hasSubTasks> <inShortHistory>true</inShortHistory> <isGroup>true</isGroup> <numberOfTimesModified>2</numberOfTimesModified> <passwordRequiredOnUpdate>false</passwordRequiredOnUpdate> <pushbackSequence>INITIAL_ASSIGNEES;1</pushbackSequence> <secureNotifications>false</secureNotifications> <state>ASSIGNED</state> <substate>ACQUIRED</substate> <taskId>ce34ebe9-703d-4170-ac39-76fb9d141037</taskId> <taskNumber>200101</taskNumber> <updatedBy> <id>yuki</id> <displayName>yuki</displayName> <type>user</type> </updatedBy> <updatedDate>2015-03-16T11:44:20+07:00</updatedDate> <version>2</version> <versionReason>TASK_VERSION_REASON_ACQUIRED</versionReason> <taskDefinitionId>TelkomHIE/BpmFlow!1.1/Humantask2</taskDefinitionId> <taskDefinitionName>Humantask2</taskDefinitionName> <workflowPattern>Participant</workflowPattern> <isTestTask>false</isTestTask> <participantName>default.DefaultPerformer</participantName> <reviewers> <id>ProcessReviewer</id> <displayName/> <type>ROLE</type> </reviewers> <assignees> <id>BpmFlow.FlowDua</id> <displayName>BpmFlow.FlowDua</displayName> <type>application_role</type> </assignees> <rootTaskId>ce34ebe9-703d-4170-ac39-76fb9d141037</rootTaskId> <systemStringActions>PUSH_BACK,sharePayload</systemStringActions> <stage>Stage1</stage> <isTemplateTask>false</isTemplateTask> <taskNamespace>http://xmlns.oracle.com/BPMFlow/BpmFlow/Humantask2</taskNamespace> <timers>[wf_auto_release=true]</timers> <componentType>Workflow</componentType> <activityName>UserTask1</activityName> <activityId>ACT12343189529316</activityId> <thread>0</thread> <parentThread>-1</parentThread> <swimlaneRole>FlowDua</swimlaneRole> <timersSuspended>false</timersSuspended> <tenantIdNumber>-1</tenantIdNumber> <isDecomposedTask>false</isDecomposedTask> <formName>default</formName> </systemAttributes> <systemMessageAttributes> <numberAttribute1>0.0</numberAttribute1> <numberAttribute2>0.0</numberAttribute2> <numberAttribute3>0.0</numberAttribute3> <numberAttribute4>0.0</numberAttribute4> <numberAttribute5>0.0</numberAttribute5> <numberAttribute6>0.0</numberAttribute6> <numberAttribute7>0.0</numberAttribute7> <numberAttribute8>0.0</numberAttribute8> <numberAttribute9>0.0</numberAttribute9> <numberAttribute10>0.0</numberAttribute10> <protectedNumberAttribute1>0.0</protectedNumberAttribute1> <protectedNumberAttribute2>0.0</protectedNumberAttribute2> <protectedNumberAttribute3>0.0</protectedNumberAttribute3> <protectedNumberAttribute4>0.0</protectedNumberAttribute4> <protectedNumberAttribute5>0.0</protectedNumberAttribute5> <protectedNumberAttribute6>0.0</protectedNumberAttribute6> <protectedNumberAttribute7>0.0</protectedNumberAttribute7> <protectedNumberAttribute8>0.0</protectedNumberAttribute8> <protectedNumberAttribute9>0.0</protectedNumberAttribute9> <protectedNumberAttribute10>0.0</protectedNumberAttribute10> </systemMessageAttributes> <callback> <id>BPMFlowProcess/HumanTasks.Humantask2.reference</id> <converstationId>urn:883fe82e-cb96-11e4-aec4-6ac578b5c089</converstationId> </callback> <isPublic>false</isPublic> <sca> <applicationName>TelkomHIE</applicationName> <componentName>Humantask2</componentName> <compositeDN>TelkomHIE/BpmFlow!1.1*soa_d5fea338-73b5-41f6-8e7c-51413d395e62</compositeDN> <compositeInstanceId>60032</compositeInstanceId> <compositeName>BpmFlow</compositeName> <compositeVersion>1.1</compositeVersion> <ecId>8986bff4-3cbf-4a5b-8f08-6f0326c294a8-0000b6d6</ecId> <parentComponentInstanceId>bpmn:60095</parentComponentInstanceId> <parentComponentInstanceRefId>60095-ACT12343189529316-BPMFlowProcess_try.3-1</parentComponentInstanceRefId> <headerProperties>rO0ABXNyABFqYXZhLnV0aWwuSGFzaE1hcAUH2sHDFmDRAwACRgAKbG9hZEZhY3Rvckk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VJbnN0YW5jZUlkdAAFNjAwMzJ0AA10cmFja2luZy5lY2lkdAAtODk4NmJmZjQtM2NiZi00YTViLThmMDgtNmYwMzI2YzI5NGE4LTAwMDBiNmQ2dAAfdHJhY2tpbmcuSW5zdGFuY2VJZENyZWF0aW9uVGltZXQADTE0MjY0ODA4MTIzNDd0ABd0cmFja2luZy5jb252ZXJzYXRpb25JZHQAKHVybjo4ODNmZTgyZS1jYjk2LTExZTQtYWVjNC02YWM1NzhiNWMwODl0AA1icGVsLnByaW9yaXR5dAABMHQAHHRyYW5zcG9ydC5odHRwLnJlbW90ZUFkZHJlc3N0AA0xOTIuMTY4LjEuMTg0eA==</headerProperties> <compositeCreatedTime>2015-03-16T11:40:07.455+07:00</compositeCreatedTime> <componentInstanceId>60096</componentInstanceId> <flowId>60026</flowId> <scaPartitionId>60</scaPartitionId> </sca> <applicationContext>OracleBPMProcessRolesApp</applicationContext> <taskDefinitionId>TelkomHIE/BpmFlow!1.1/Humantask2</taskDefinitionId> <correlationId>ce34ebe9-703d-4170-ac39-76fb9d141037</correlationId> <mdsLabel>soa_cf_ed1f0f6f-b93c-4b73-b1f2-f63584182e50</mdsLabel> <customAttributes/> </task> </tas:updateTask> </soapenv:Body> </soapenv:Envelope>
  5. Dengan melakukan step 4, maka payload nama & alamat akan ada penambahan kata "edit via Web Service". Langkah selanjutnya adalah mengupdate outcome nya. Untuk mempermudah copy lagi isi tag <task> dari response di atas. Kemudian buka operation updateOutcome pada TaskService. updateOutcome berfungsi untuk merubah outcome pada suatu task. Di dalam nya terdapat informasi tentang task, taskId serta outcome yang harus kita isi. Paste isi tag <task> dengan isi tag <task> yang sudah kita copy tadi. Kemudian isi taskId sesuai dengan taskId yang ada di dalam response pada step 4 dan isi outcome nya menjadi APPROVE. Dalam kasus ini outcome hanya ada APPROVE atau REJECT.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tas="http://xmlns.oracle.com/bpel/workflow/taskService" xmlns:com="http://xmlns.oracle.com/bpel/workflow/common" xmlns:task="http://xmlns.oracle.com/bpel/workflow/task" xmlns:tas1="http://xmlns.oracle.com/bpel/workflow/TaskEvidenceService"> <soapenv:Header/> <soapenv:Body> <tas:updateTaskOutcome> <com:workflowContext> <com:credential> <com:login>yuki</com:login> <com:password>welcome1</com:password> </com:credential> </com:workflowContext> <task xmlns="http://xmlns.oracle.com/bpel/workflow/task"> <title>BpmFlow</title> <payload> <input xmlns="http://www.nostratech.com/input/type"> <name>hendra edit via WebService</name> <address>harapan indah edit via WebService</address> </input> </payload> <taskDefinitionURI>TelkomHIE/BpmFlow!1.1/Humantask2</taskDefinitionURI> <creator>andre</creator> <ownerRole>BpmFlow.ProcessOwner</ownerRole> <priority>3</priority> <identityContext>jazn.com</identityContext> <processInfo> <instanceId>60095</instanceId> <processId>BPMFlowProcess</processId> <processName>BPMFlowProcess</processName> </processInfo> <systemAttributes> <acquiredBy>yuki</acquiredBy> <assignedDate>2015-03-16T11:40:13+07:00</assignedDate> <createdDate>2015-03-16T11:40:12+07:00</createdDate> <digitalSignatureRequired>false</digitalSignatureRequired> <fromUser> <id>andre</id> <displayName>andre</displayName> <type>user</type> </fromUser> <hasSubTasks>false</hasSubTasks> <inShortHistory>false</inShortHistory> <isGroup>true</isGroup> <numberOfTimesModified>3</numberOfTimesModified> <passwordRequiredOnUpdate>false</passwordRequiredOnUpdate> <pushbackSequence>INITIAL_ASSIGNEES;1</pushbackSequence> <secureNotifications>false</secureNotifications> <state>ASSIGNED</state> <substate>ACQUIRED</substate> <taskId>ce34ebe9-703d-4170-ac39-76fb9d141037</taskId> <taskNumber>200101</taskNumber> <updatedBy> <id>yuki</id> <displayName>yuki</displayName> <type>user</type> </updatedBy> <updatedDate>2015-03-16T11:54:08+07:00</updatedDate> <version>3</version> <versionReason>TASK_VERSION_REASON_UPDATED</versionReason> <taskDefinitionId>TelkomHIE/BpmFlow!1.1/Humantask2</taskDefinitionId> <taskDefinitionName>Humantask2</taskDefinitionName> <workflowPattern>Participant</workflowPattern> <isTestTask>false</isTestTask> <participantName>default.DefaultPerformer</participantName> <reviewers> <id>ProcessReviewer</id> <displayName/> <type>ROLE</type> </reviewers> <assignees> <id>BpmFlow.FlowDua</id> <displayName>BpmFlow.FlowDua</displayName> <type>application_role</type> </assignees> <rootTaskId>ce34ebe9-703d-4170-ac39-76fb9d141037</rootTaskId> <systemStringActions>PUSH_BACK,sharePayload</systemStringActions> <stage>Stage1</stage> <isTemplateTask>false</isTemplateTask> <taskNamespace>http://xmlns.oracle.com/BPMFlow/BpmFlow/Humantask2</taskNamespace> <timers>[wf_auto_release=true]</timers> <componentType>Workflow</componentType> <activityName>UserTask1</activityName> <activityId>ACT12343189529316</activityId> <thread>0</thread> <parentThread>-1</parentThread> <swimlaneRole>FlowDua</swimlaneRole> <timersSuspended>false</timersSuspended> <tenantIdNumber>-1</tenantIdNumber> <isDecomposedTask>false</isDecomposedTask> <formName>default</formName> </systemAttributes> <systemMessageAttributes> <numberAttribute1>0.0</numberAttribute1> <numberAttribute2>0.0</numberAttribute2> <numberAttribute3>0.0</numberAttribute3> <numberAttribute4>0.0</numberAttribute4> <numberAttribute5>0.0</numberAttribute5> <numberAttribute6>0.0</numberAttribute6> <numberAttribute7>0.0</numberAttribute7> <numberAttribute8>0.0</numberAttribute8> <numberAttribute9>0.0</numberAttribute9> <numberAttribute10>0.0</numberAttribute10> <protectedNumberAttribute1>0.0</protectedNumberAttribute1> <protectedNumberAttribute2>0.0</protectedNumberAttribute2> <protectedNumberAttribute3>0.0</protectedNumberAttribute3> <protectedNumberAttribute4>0.0</protectedNumberAttribute4> <protectedNumberAttribute5>0.0</protectedNumberAttribute5> <protectedNumberAttribute6>0.0</protectedNumberAttribute6> <protectedNumberAttribute7>0.0</protectedNumberAttribute7> <protectedNumberAttribute8>0.0</protectedNumberAttribute8> <protectedNumberAttribute9>0.0</protectedNumberAttribute9> <protectedNumberAttribute10>0.0</protectedNumberAttribute10> </systemMessageAttributes> <callback> <id>BPMFlowProcess/HumanTasks.Humantask2.reference</id> <converstationId>urn:883fe82e-cb96-11e4-aec4-6ac578b5c089</converstationId> </callback> <isPublic>false</isPublic> <sca> <applicationName>TelkomHIE</applicationName> <componentName>Humantask2</componentName> <compositeDN>TelkomHIE/BpmFlow!1.1*soa_d5fea338-73b5-41f6-8e7c-51413d395e62</compositeDN> <compositeInstanceId>60032</compositeInstanceId> <compositeName>BpmFlow</compositeName> <compositeVersion>1.1</compositeVersion> <ecId>8986bff4-3cbf-4a5b-8f08-6f0326c294a8-0000b6d6</ecId> <parentComponentInstanceId>bpmn:60095</parentComponentInstanceId> <parentComponentInstanceRefId>60095-ACT12343189529316-BPMFlowProcess_try.3-1</parentComponentInstanceRefId> <headerProperties>rO0ABXNyABFqYXZhLnV0aWwuSGFzaE1hcAUH2sHDFmDRAwACRgAKbG9hZEZhY3RvckkACXRocmVzaG9sZHhwP0AAAAAAABh3CAAAACAAAAAPdAAddHJhY2tpbmcuQ29tcG9zaXRlU0NBRW50aXR5SWR0AAU2MDAwMXQAFHRyYWNraW5nLlNDQUVudGl0eUlkdAAFNjAwMDR0ABp0cmFja2luZy5Db3JyZWxhdGlvbkZsb3dJZHQAIjAwMDBLa1dzUnNXRjRFV0ZMekZTOEExS3pJQmgwMDAwMTZ0ABl0cmFja2luZy5yZXNwb25zZS5jb250ZXh0c3IAJmphdmEudXRpbC5jb25jdXJyZW50LkNvbmN1cnJlbnRIYXNoTWFwZJneEp2HKT0DAANJAAtzZWdtZW50TWFza0kADHNlZ21lbnRTaGlmdFsACHNlZ21lbnRzdAAxW0xqYXZhL3V0aWwvY29uY3VycmVudC9Db25jdXJyZW50SGFzaE1hcCRTZWdtZW50O3hwAAAADwAAABx1cgAxW0xqYXZhLnV0aWwuY29uY3VycmVudC5Db25jdXJyZW50SGFzaE1hcCRTZWdtZW50O1J3P0Eymzl0AgAAeHAAAAAQc3IALmphdmEudXRpbC5jb25jdXJyZW50LkNvbmN1cnJlbnRIYXNoTWFwJFNl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NxAH4ADnNxAH4AEgAAAAA/QAAAc3EAfgAOc3EAfgASAAAAAD9AAABzcQB+AA5zcQB+ABIAAAAAP0AAAHNxAH4ADnNxAH4AEgAAAAA/QAAAcQB+AFxzcQB+AF0AAAAAAADqf3EAfgBgc3EAfgBdAAAAAAAA6r5xAH4AYnNxAH4AXQAAAAAAAOq8cHB4cHB4dAAbdHJhY2tpbmcuRmxvd1NDQVBhcnRpdGlvbklkdAACNjB0ABh0cmFja2luZy5GbG93Q3JlYXRlZFRpbWVzcgAOamF2YS51dGlsLkRhdGVoaoEBS1l0GQMAAHhwdwgAAAFMIOG+H3h0ABN0cmFja2luZy5JbnN0YW5jZUlkdAAFNjAwOTZ0AA90cmFja2luZy5GbG93SWR0AAU2MDAyNnQAFHRyYWNraW5nLkZsb3dFdmVudElkdAAFNjAyNjB0ABx0cmFja2luZy5jb21wb3NpdGVJbnN0YW5jZUlkdAAFNjAwMzJ0AA10cmFja2luZy5lY2lkdAAtODk4NmJmZjQtM2NiZi00YTViLThmMDgtNmYwMzI2YzI5NGE4LTAwMDBiNmQ2dAAfdHJhY2tpbmcuSW5zdGFuY2VJZENyZWF0aW9uVGltZXQADTE0MjY0ODA4MTIzNDd0ABd0cmFja2luZy5jb252ZXJzYXRpb25JZHQAKHVybjo4ODNmZTgyZS1jYjk2LTExZTQtYWVjNC02YWM1NzhiNWMwODl0AA1icGVsLnByaW9yaXR5dAABMHQAHHRyYW5zcG9ydC5odHRwLnJlbW90ZUFkZHJlc3N0AA0xOTIuMTY4LjEuMTg0eA==</headerProperties> <compositeCreatedTime>2015-03-16T11:40:07.455+07:00</compositeCreatedTime> <componentInstanceId>60096</componentInstanceId> <flowId>60026</flowId> <scaPartitionId>60</scaPartitionId> </sca> <applicationContext>OracleBPMProcessRolesApp</applicationContext> <taskDefinitionId>TelkomHIE/BpmFlow!1.1/Humantask2</taskDefinitionId> <correlationId>ce34ebe9-703d-4170-ac39-76fb9d141037</correlationId> <mdsLabel>soa_cf_ed1f0f6f-b93c-4b73-b1f2-f63584182e50</mdsLabel> <customAttributes/> </task> <tas:taskId>ce34ebe9-703d-4170-ac39-76fb9d141037</tas:taskId> <tas:outcome>APPROVE</tas:outcome> </tas:updateTaskOutcome> </soapenv:Body> </soapenv:Envelope>
Kita sudah selesai memanipulasi data dari suatu task dan mengupdate outcome nya. Kalian bisa mencoba coba hal lain seperti menambah attachment ataupun comment.

Demikian tutorial kali ini.
Semoga Bermanfaat !

Happy Coding !

Human Workflow Web Services Part 1

Tentunya pernah bukan menggunakan Oracle BPM's Workspace? Harus diketahui bahwa semua data & action yang kalian lihat disana disediakan oleh Human Workflow Services. Ada berbagai macam cara berinteraksi dengan Oracle Human Workflow Service. Kalian bisa menggunakan java dan membuat aplikasi kalian sendiri, menggunakan aplikasi BPM Worklist atau menggunakan Human Workflow Web Service. Pada kesempatan ini saya akan membahas tentang Human Workflow Web Service pada Oracle BPM. Kalian bisa langsung mencoba nya dari soapUI atau webservice framework lainnya.

Ada dua buah Human Workflow Web Service yang akan sering kita pergunakan. Yang pertama adalah TaskQueryService, Webservice ini bisa digunakan untuk mendapatkan task atau melakukan query pada worklow service. 
WSDL url nya : http://host:port/integration/services/TaskQueryService/TaskQueryService?WSDL 
contoh : soa12c.nostratech.com:8001/integration/services/TaskQueryService/TaskQueryService?WSDL 

Yang kedua adalah TaskService, Webservice ini bisa menggunakan CRUD action pada human task.
WSDL url nya = http://host:port/integration/services/TaskService/TaskServicePort?WSDL
contoh : soa12c.nostratech.com:8001/integration/services/TaskService/TaskServicePort?WSDL

Sekarang kita akan bermain dengan TaskQueryService terlebih dahulu dan pada Part 2 kita akan bermain dengan TaskService. 

Pada TaskQueryService terdapat berbagai macam operasi yang dapat digunakan, salah satunya queryTask. Dengan menggunakan queryTask kita bisa mengquery task yang kita inginkan. Sebagai contoh saya akan menquery task yang telah di assign ke user andre dan grup dimana user andre telah bergabung.



<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
 xmlns:tas="http://xmlns.oracle.com/bpel/workflow/taskQueryService" 
 xmlns:com="http://xmlns.oracle.com/bpel/workflow/common" 
 xmlns:tas1="http://xmlns.oracle.com/bpel/workflow/taskQuery" 
 xmlns:task="http://xmlns.oracle.com/bpel/workflow/task">
   <soapenv:Header/>
   <soapenv:Body>
      <tas:taskListRequest>
         <com:workflowContext>
            <com:credential>
               <com:login>andre</com:login>
               <com:password>welcome1</com:password>
            </com:credential>
         </com:workflowContext>
         <tas1:taskPredicateQuery>
            <tas1:displayColumnList>
               <tas1:displayColumn>textAttribute1</tas1:displayColumn>
               <tas1:displayColumn>textAttribute2</tas1:displayColumn>
               <tas1:displayColumn>textAttribute3</tas1:displayColumn>
            </tas1:displayColumnList>
            <tas1:optionalInfoList>
               <tas1:taskOptionalInfo>Comments</tas1:taskOptionalInfo>
               <tas1:taskOptionalInfo>Attachments</tas1:taskOptionalInfo>
               <tas1:taskOptionalInfo>Payload</tas1:taskOptionalInfo>
            </tas1:optionalInfoList>
            <tas1:predicate>
               <tas1:assignmentFilter>My+Group</tas1:assignmentFilter>
               <tas1:clause>
                  <tas1:column>STATE</tas1:column>
                  <tas1:operator>EQ</tas1:operator>
                  <tas1:value>ASSIGNED</tas1:value>
               </tas1:clause>
            </tas1:predicate>
         </tas1:taskPredicateQuery>
      </tas:taskListRequest>
   </soapenv:Body>
</soapenv:Envelope>

Bisa kita lihat dari kode di atas, kode yang berwarna biru merupakan inti yang harus kita isi. Code yang berwarna hitam & di bold adalah contoh isi yang benar, sedangkan untuk yang berwarna merah, itu untuk menampilkan atribut yang kita inginkan dalam contoh ini ada 3 atribut yang ingin ditampilkan yaitu Comment, Attachment, Payload. 


Pada bagian assignmentFilter, kita bisa merubah menjadi : All, My, Group, My+Group, My+Group+All, Reportees, Creator, Owner, Previous, Admin. 


Pada bagian operator, kita bisa merubah menjadi : EQ, NEQ, GT, GTE, LT, LTE, LIKE, NOT_LIKE, IN, NOT_IN, CONTAINS, NOT_CONTAINS, BEGINS, NOT_BEGINS, ENDS, NOT_ENDS, BEFORE, AFTER, ON, NEXT_N_DAYS, LAST_N_DAYS, IS_IN_FUTURE, IS_IN_PAST, IS_NULL, IS_NOT_NULL


Untuk melihat document oracle tentang TaskQueryService & melihat isi table WFTask bisa klik disini


Response dari request di atas akan berupa list of task elemen. Dimana setiap task element mempunyai sub elemen seperti title, priority, taskNumber dan taskId.

Sekarang kita sudah bisa mendapatkan list task yang user andre harus kerjakan. Mirip bukan seperti kita login dalam BPM Worklist? Namun sekarang kita bisa menggunakan UI lain untuk mengakses BPM Workspace.


Sekian dulu untuk Part 1.

Semoga Bermanfaat !
Happy Coding :)