Archive for April 2011
Who should I follow on Twitter?
Twitter has some improvements of the user interface and a brilliant suggestion whom I should follow on Twitter… 🙂
Powerful Java API of a Process Engine
Yesterday, I attend a presentation about the Open Source > Activity BPM platform. A part of it is the Process Engine which has a Java-based API. You can find a > short tutorial about the API on the Activiti website. Of course, other available Process Engine have an API, too. For example > PAVONE Espresso Workflow, which is the core component of > PAVONElive, has a powerful Java API. This code snippet shows you how easy you can import a process definition, create a new process instance based on the process definition and complete the first task of the process.
// STEP 1: Import the process definition
// Imports the file LoanApplication.xml in the directory “c:\ProcessDefinitions”.
WfProcessDefinition wfDef = Session.importXMLProcessDefinition(“c:\\LoanApplication.xml”, “”);// STEP 3: Initiate a process
// This step initiates a process based on the process definition called ‘Loan Application’
WfProcess process = pcsSession.initiateWfProcess( “”, “Loan Application” , “”, “”);// STEP 4: Get the first task “Start Loan Application”
// First get all tasks which are in progress and then get the first task of this set.
Set tasks = process.getTasks ( TaskStatus.IN_PROGRESS );
Iterator iterator = tasks.iterator();
WfTask task = (WfTask)iterator.next();// Place some operations on the task here
// … Your code …// STEP 5: Complete the first task “Start Loan Application”
boolean success = task.complete();
if ( success == false ) {
// not successful, add error handling
return;
}
Further, you have access to several other features and all the data which will be handled by the engine.
(Source: Excerpt of the Getting Started Guide)
Why I hate Windows Update
Everytime you have no time or have to hurry up and shut down your laptop: an automatic > Windows Update will start. Of course, you have no time, but you have to wait until Windows Update is finished. Sometimes it takes a long, long time. Or you sit in a train with a bad UMTS connection and have to restart Windows, since something does not work and then… Windows Update will start… 😦