Skip to main content
Jump to: navigation, search

Difference between revisions of "Stardust/Knowledge Base/Reference Project"

(Running the Project)
Line 46: Line 46:
  
 
* Install Stardust for Helios or Kepler
 
* Install Stardust for Helios or Kepler
* Create a Dynamic Web Project with Stardust Profile enabled
+
* Create a Dynamic Web Project with Stardust Profile enabled (for more details see the [https://infinity.sungard.com/documentation/stardust/0.7/topic/org.eclipse.stardust.docs.dev/html/handbooks/tutorial/support-case/support-case-preface.htm Support Case example] in the documentation).
** Aduit Trail Database initialization
+
 
* Load the charity-portal Utility Project from [http://git.eclipse.org/c/stardust/org.eclipse.stardust.examples.git Examples in Stardust Git]
 
* Load the charity-portal Utility Project from [http://git.eclipse.org/c/stardust/org.eclipse.stardust.examples.git Examples in Stardust Git]
 
* Copy the Process Model to a folder proces-models (or the like) in your Dynamic Web Project
 
* Copy the Process Model to a folder proces-models (or the like) in your Dynamic Web Project

Revision as of 08:41, 30 March 2013

Scenario

The Federal Charity institution of Neverland provides an Internet platform for charity organizations to distribute their benefits to those in need. Charity institutions can register and describe their rules for accepting beneficiaries. Beneficiaries can apply for benefits such as vacation funding.

Main Elements

Processes, Events and Activities

  • Charity Organization Registration and Approval
    • Data Entry
    • Address Verification
    • Review
    • Approval/Rejection
  • Vacation Request
    • Data Entry
    • Address Verification
    • Dispatching to Charity Organization
    • Review
    • Approval/Rejection

Participants

  • Platform Operators from the roof organization running/operating the system
  • Administrators of the charity organizations
  • Applicants would only be implicit participants kicking of workflows via a little portal and receiving notifications

Services

  • Address Validation Specifications managed in EasySOA, implementation prototyped in OW2 FraSCAti Studio
  • HTML/JS UI Component for Organization Review
  • Simplistic HTML5 web portal for Charity organization registration (kicking off first process) Application for vacation funding (kicking off second process)

Data Model

  • XSD
  • Charity Organization (Structure)
  • Vacation Funding Request (Structure)
  • Beneficiary (Structure)
  • Address (Structure)
  • Country (Structure)
  • Used across tools (BPM, WS)

Running the Project

  • Install Stardust for Helios or Kepler
  • Create a Dynamic Web Project with Stardust Profile enabled (for more details see the Support Case example in the documentation).
  • Load the charity-portal Utility Project from Examples in Stardust Git
  • Copy the Process Model to a folder proces-models (or the like) in your Dynamic Web Project
  • Add the charity-portal Utility Project

Selected Implementation Aspects

Charity Portal

The Charity Portal is a simple HTML/JS-based implementation which leverages

Processes are started via REST calls from the class ServiceAdapter

   jQuery.ajax({type : "POST",
		beforeSend: function (request)
		{
		   request.setRequestHeader("Authentication", self.getBasicAuthenticationHeader());
		},
		url : this.getProcessStartUrl("CharityOrganizationRegistration"),
		contentType : "application/xml",
		data : payload}).done(function() {
		      deferred.resolve();
		   }).fail(function() {
		      deferred.reject();
		});

using a Deferred pattern for synchronicity.

The XML payload to initialize the Process Data is assembled manually from the JSON objects used in the UI.

   var payload = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
					
   payload += "<ser:Args xmlns:ser=\"http://eclipse.org/stardust/models/generated/Charity\" " +
      "xmlns:cha=\"http://www.infinity.com/bpm/model/Charity/CharityOrganization\" " +
      "xmlns:add=\"http://www.infinity.com/bpm/model/Charity/Address\">\n";					
   payload += "   <ser:CharityOrganization>\n";
   payload += "      <cha:CharityOrganization>\n";
   payload += "         <name>" + organization.name + "</name>\n";
   payload += "         <description>" + organization.description + "</description>\n";
   payload += "         <beneficiarySelectionRules>" + organization.beneficiarySelectionRules + "</beneficiarySelectionRules>\n";
   payload += "         <add:address>\n";
   payload += "            <street>" + organization.address.street + "</street>\n";
   payload += "            <city>" + organization.address.city + "</city>\n";
   payload += "            <postalCode>" + organization.address.postalCode + "</postalCode>\n";
   payload += "            <state>" + organization.address.state + "</state>\n";
   payload += "            <country>" + organization.address.country + "</country>\n";
   payload += "         </add:address>\n";
   payload += "      </cha:CharityOrganization>\n";
   payload += "   </ser:CharityOrganization>\n";
   payload += "</ser:Args>\n";

This might be replaced by an automated conversion, e.g. with json2xml. Volunteers to help are welcome to submit via Gerrit.

Process Descriptors

Department Concept

UI Mashup

Back to the top