Remote Debug jbpm processes (including workitems code) - wildfly

I'm trying to find a way of debugging my jbpm processes. These processes include many custom work items handlers (some of them are asynchronous, completed via Rest Api).
Can anyone suggest me how to procede?
Thanks,
Laura

Related

Creating a custom task scheduler in Adobe CQ

We have a specific requirement to create a custom scheduler in CQ to perform some admnistrative tasks based on some parameters specified by the administrator. I have seen the Scheduler service offered by Sling. But wanted to know whether there is any issues in using Quratz APIs direcly rather than using this sling wrapper to schedule the tasks? Wanted to know did any one us alredy has developed such a CQ Component?
Is there any issue in invoking CQ flush agent programatically (as a scheduled Job, which runs periodically based on some configurations)?
Any pointers in this area would help us a lot.
Thanks,
San
Schedulers in CQ are working well. I programmed many in my years as a CQ developer. It is an OSGi service either implementing the java.lang.Runnable or org.apache.sling.commons.scheduler.Job. The former is usually enough. You only have to configure the scheduler.expression property which follows the quartz syntax and implement the run method.
I can't answer that as I never tried it. But I don't see why it shouldn't work. At my customer we have an independent cron job deleting the dispatcher cache instead of using a flush agent.

Advice needed on workflow

We are currently trying to decide how to implement workflow into our enterprise application. We must support very complex workflow scenarios and we must also handle approx 10000 concurrent users. The application domain is healthcare. The client is a WPF application talking to an IIS backend using WCF. The question is: Does anybody have any experience with Windows workflow foundation in such a large enterprise application? From the requirements is seems like WWF fits the bill, but I am worried about performance and scalability. Should I continue to investigate into WWF or is WWF just not suitable for this kind of applications? We also need to let our consultants have the ability to alter workflows and re-hosting the WWF designer certainly sounds tempting. What do you think. Is WWF the way to go? 
You can create a workflow that is directly hosted by IIS. You can use the "Receive" activity to setup the WF to handle requests. You can then attach a "Send" activity to reply back to the client with a response, and even have the workflow continue processing in the background that activity. Hope that provides some direction to get you started. You can achieve this with either the .NET Framework 3.5 or 4.x versions, but .NET 4.0 is much easier to setup.
The performance will rely on the hardware.
Anyway, workflow services are perfectly scalables in IIS. You will be able to set up a server farm that will serve all the request.
Regarding the requirement of altering workflows, always is possible to alter the workflow in a way that future requests will create instances of the new altered workflow. Old and already initiated workflows can not take any variation. So,if I have not understood wrongly, WWF does not fit this requirement.

Searching workflow/process tool based on ZF

Does anyone know a workflow system based on Zend (or php), which is open source and can be integrated in a project? What do I understand as workflow system:
User starts a workflow through submitting some start parameter (e.g. SOAP/HTML request)
Zend runs the workflow in the background (on high server load the operations are lined up in a queue)
Workflow may be build out of several modules/actions e.g. export xml > create pdf > send pdf to user > send email (Backend)
User sees current status of the running workflow online and gets the result as soon as finished through ajax requests to the server. (User Interface)
Admin has a overview of general running workflows (Admin Interface)
Thanks for your hints!
If I understand correctly, the workflow is just a pre-defined set of actions.
I don't believe there is a ready tool for this, but I think you may be interested in running a set of cron jobs from the Zend Framework CLI (e.g. building your own Zend_Tool Provider) and in Zend_Queue.
You might want to use the right tool for such task - eg. Gearman. It is a piece of software solely for the requirements you described. See more here:
http://www.slideshare.net/felixdv/high-gear-php-with-gearman
http://weierophinney.net/matthew/archives/240-Writing-Gearman-Workers-in-PHP.html
You may want to try eZ Components Workflow library: http://www.ezcomponents.org/docs/api/trunk/introduction_Workflow.html
This post describes how to integrate the eZ Components library with Zend:
http://devzone.zend.com/article/156
Other than that I haven't found any real examples of integrating the eZ workflow classes with a Zend MVC application.
Symfony has a component for this. http://symfony.com/doc/current/components/workflow.html
Oro platform has a bundle for this.
https://github.com/oroinc/platform/blob/master/src/Oro/Bundle/WorkflowBundle/Resources/doc/index.md
Otherwise, you could build your own implementation based on maybe the State design pattern. Here is a nice example from Sebastian Bergman.
https://github.com/sebastianbergmann/state

Need opinion regarding design/architecture of a web application

I am working on a web application which needs to get data from some local and some non local resources and then display it. As it could take arbitrary amount of time to get the data from these resources I am thinking of using the actors concept so that each actor is responsible for getting data from the respective resource. The request thread will wait for each actor to finish its task and then use ajax to update only the portion of the web page that is dependent on that data. This way user will start seeing the data as soon as it is received rather than wait for all of them to finish and then get a first look at the data.
I am planning to look into scala/lift framework for this. I have read some articles on the web for scala/lift and want to explore if this is the correct way to approach this problem and also if scala/lift is good platform of choice. I have worked in Java and C# previously. Any opinions, comments, suggestions are welcome.
Thanks,
gary
Take a look a message queue technology like Java's JMS. Message queues allow you to handle long running background tasks asynchronously and reliably. This is the technique sites like Flickr and YouTube use to do media transcoding asynchronously. You can use a Java EE server, or a JMS technology like Apache's ActiveMQ, and then layer your Scala/Lift code on top of it.
Richard Monson-Haefel's book on JMS covers it well.
For more general help with web site scaling and construction, take a look at Todd Hoff's excellent blog, highscalability.com/. There are some good pointers to using message queues to offload long-running tasks this way.
BTW, Twitter uses Scala for something much like what you're considering. Here's an interview with some of their developers; they describe one way they use Scala:
Robey Pointer: A lot of our architecture is based on letting Rails do what it does best, which is the AJAX, the web front ends, the website—what the user sees. Anything we can offload out of the request/response cycle, we do. So we queue those tasks into a messaging system and have back-end daemons handle them.
If the non-local resources originate at some other service or system, Event Driven Architecture might work for you. Instead of pulling from the non-local resources you could set up this web-application as a subscriber to the events published by these services. Upon receiving a message regarding part of its functionality it would cache locally the data it's interested in. This should let you escape the issue of asynchronous update of parts of the page (all data would be accessible locally).
Udi Dahan blogs about this approach a lot and is also an author of a .NET message bus (NServiceBus) that can be used in such scenarios. See for example http://msdn.microsoft.com/en-us/architecture/aa699424.aspx
Actors would be a way to go. You're essentially setting up a light weight version of JMS. And Lift does the comet stuff very well.
In addition to the Scala actors, and the Lift Actors, you also have akka actors. When Scala Swarm becomes production ready you'll be ready for that too.
If the delayed information is distinct from the information that needs to display immediately, with Lift you can use a LazyLoad snippet that has the longer-running computation (calling the web service) as part of its logic. Lift will take care of inserting it into the page when its ready.

Windows Workflow Foundation in ASP.NET 3.5 Web Application - Best Approach

What is the best way to use Windows Workflow Foundation in ASP.NET 3.5 Web Application.
In my case there are several workflows(sequential) which includes numerous steps, user has the privilege to save and exit at any of these steps; the state must be persisted, possibly in SQL Server.
Exposing workflows as web service is good idea? I have very little idea about workflows and only tried out wf console applications.
Please guide me in right direction, also I would like to know is there any specific and established architecture to use wf in ASP.NET Web Apps. We have layered architecture for our web apps (BLL, DAL, Services etc) and I would like to know where we can incorporate workflows in current architecture.
Many thanks in advance.
Update: thank you Rubens Farias for helping me out in first place.
We are still unsure which approach will be the best.
Please provide any example frameworks or sample webapplication which use workflow
So far...
1. Is it good idea to use Page Flow Application Block
2. There are lots of changes in WF4, should I wait for that?
3. Or use WF as Rubes Farias suggested
Please guide me friends, am desperate :(
You definitely must read this document: Foundations: Workflow Services
You can to add an out-of-box persistence service, so your workflows get persisted into a SQL Server database, and to expose them as WCF services (RESTfull approaches is also available).