Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unification of persistence and transaction handling for jbpm and huma…
…n task
- Loading branch information
1 parent
a69396c
commit d9cd9b1
Showing
17 changed files
with
341 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 8 additions & 2 deletions
10
...s-client/src/main/java/org/kie/services/client/api/command/RemoteTaskCommandExecutor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
package org.kie.services.client.api.command; | ||
|
||
import org.drools.core.command.CommandService; | ||
import org.kie.api.runtime.CommandExecutor; | ||
import org.kie.internal.command.Context; | ||
|
||
class RemoteTaskCommandExecutor extends AbstractRemoteCommandObject implements CommandExecutor { | ||
class RemoteTaskCommandExecutor extends AbstractRemoteCommandObject implements CommandService { | ||
|
||
RemoteTaskCommandExecutor(RemoteConfiguration configuration) { | ||
super(configuration); | ||
isTaskService = true; | ||
} | ||
|
||
|
||
@Override | ||
public Context getContext() { | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 0 additions & 83 deletions
83
.../kie-services-remote/src/main/java/org/kie/services/remote/cdi/TransactionalExecutor.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...ervices-remote/src/main/java/org/kie/services/remote/util/ExecuteAndSerializeCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.kie.services.remote.util; | ||
|
||
import org.jbpm.services.task.commands.TaskCommand; | ||
import org.jbpm.services.task.impl.model.xml.JaxbContent; | ||
import org.jbpm.services.task.impl.model.xml.JaxbTask; | ||
import org.kie.api.task.model.Content; | ||
import org.kie.api.task.model.Task; | ||
import org.kie.internal.command.Context; | ||
|
||
public class ExecuteAndSerializeCommand extends TaskCommand<Object>{ | ||
|
||
private TaskCommand command; | ||
|
||
public ExecuteAndSerializeCommand(){ | ||
|
||
} | ||
|
||
public ExecuteAndSerializeCommand(TaskCommand command) { | ||
this.command = command; | ||
} | ||
|
||
@Override | ||
public Object execute(Context context) { | ||
Object cmdResult = command.execute(context); | ||
if( cmdResult == null ) { | ||
return null; | ||
} | ||
if( cmdResult instanceof Task) { | ||
cmdResult = new JaxbTask((Task) cmdResult); | ||
} else if( cmdResult instanceof Content) { | ||
cmdResult = new JaxbContent((Content) cmdResult); | ||
} | ||
return cmdResult; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.