Executing Asynchronous Processes from exception point
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2014 08:29 AM
I have multiple service tasks in my process. I'm not able to re-execute the job from exception point of particular task.
I'm using ''managementService.executeJob(id)'' for executing the particular job, here it is executing the process from service task1.
How to run the job from the exeception point of a process ?
Thanks in advance…
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2014 05:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2014 06:01 AM
Ya, I'm trying to throw my own exception in the service task which is not implementing java-delegate.
And here I'm looking for an option to store my custom exception in Database. Isn't it possible at all in activiti without using java-delegate.
Can you please suggest me some approach here ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2014 06:27 AM
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2014 06:52 AM
" Error while evaluating expression: #{createServer .processEvent(data)} "
Here I'm not implementing the JavaDelegate behavior to my class.
My class snippet looks this
public class CreateServer extends AbstractHandler {
@Override
protected void execute(IEvent event) throws ActivitiException {
CreateServer createServer = null;
if(event instanceof CreateServer ){
createServer = (CreateServer ) event;
myMethod(createServer ); //Custom Exception thrown in this method
}
}
}
can I store my custom exception message here ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2014 07:33 AM
An option to modify the message is to override the org.activiti.engine.impl.jobexecutor.DefaultFailedJobCommandFactory class, and return a custom DecrementJobRetriesCmd that populates the exception-message based on what you want. Currently, it does this:
if(exception != null) {
job.setExceptionMessage(exception.getMessage());
job.setExceptionStacktrace(getExceptionStacktrace());
}
Plug your custom implementation of the org.activiti.engine.impl.jobexecutor.DefaultFailedJobCommandFactory in the "failedJobCommandFactory" property of the process engine configuration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2014 02:42 AM
Do I need to implement 'FailedJobCommandFactory' interface in my exception class to override the "getCommand((jobId, exception)" method ?
Any other configuration is required ?
Please help me where & how can override this class ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2014 03:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2014 04:16 AM
public class ValidateUpdateServerRequestException extends DefaultFailedJobCommandFactory {
private static final long serialVersionUID = -5681708327398999347L;
public Command<Object> getCommand(String jobId, Throwable exception) {
return new DecrementJobRetriesCmd(jobId, exception);
}
}
How to do factory bean configuration in xml ?
Can please give me example ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2014 06:02 AM
<property name="failedJobCommandFactory">
<bean class="com.whatever.ValidateUpdateServerRequestException" />
</property>
[code]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2014 01:36 AM
I'm not getting from where it is setting this exception ?