Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BZ-1056236 - Provide registering TaskLifeCycleEventListener in Regist…
…erableItemsFactory (cherry picked from commit bc75b70)
- Loading branch information
1 parent
dd4cfe0
commit ad0aac6
Showing
27 changed files
with
991 additions
and
90 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
2 changes: 1 addition & 1 deletion
2
...human-task-core/src/main/java/org/jbpm/services/task/events/DefaultTaskEventListener.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
50 changes: 14 additions & 36 deletions
50
.../src/main/java/org/jbpm/services/task/lifecycle/listeners/TaskLifeCycleEventListener.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,43 +1,21 @@ | ||
/* | ||
* To change this template, choose Tools | Templates | ||
* and open the template in the editor. | ||
* Copyright 2013 JBoss Inc | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.jbpm.services.task.lifecycle.listeners; | ||
|
||
import java.util.EventListener; | ||
|
||
import org.kie.internal.task.api.TaskEvent; | ||
|
||
public interface TaskLifeCycleEventListener extends EventListener { | ||
|
||
public void beforeTaskActivatedEvent(TaskEvent event); | ||
public void beforeTaskClaimedEvent(TaskEvent event); | ||
public void beforeTaskSkippedEvent(TaskEvent event); | ||
public void beforeTaskStartedEvent(TaskEvent event); | ||
public void beforeTaskStoppedEvent(TaskEvent event); | ||
public void beforeTaskCompletedEvent(TaskEvent event); | ||
public void beforeTaskFailedEvent(TaskEvent event); | ||
public void beforeTaskAddedEvent(TaskEvent event); | ||
public void beforeTaskExitedEvent(TaskEvent event); | ||
public void beforeTaskReleasedEvent(TaskEvent event); | ||
public void beforeTaskResumedEvent(TaskEvent event); | ||
public void beforeTaskSuspendedEvent(TaskEvent event); | ||
public void beforeTaskForwardedEvent(TaskEvent event); | ||
public void beforeTaskDelegatedEvent(TaskEvent event); | ||
|
||
public void afterTaskActivatedEvent(TaskEvent event); | ||
public void afterTaskClaimedEvent(TaskEvent event); | ||
public void afterTaskSkippedEvent(TaskEvent event); | ||
public void afterTaskStartedEvent(TaskEvent event); | ||
public void afterTaskStoppedEvent(TaskEvent event); | ||
public void afterTaskCompletedEvent(TaskEvent event); | ||
public void afterTaskFailedEvent(TaskEvent event); | ||
public void afterTaskAddedEvent(TaskEvent event); | ||
public void afterTaskExitedEvent(TaskEvent event); | ||
public void afterTaskReleasedEvent(TaskEvent event); | ||
public void afterTaskResumedEvent(TaskEvent event); | ||
public void afterTaskSuspendedEvent(TaskEvent event); | ||
public void afterTaskForwardedEvent(TaskEvent event); | ||
public void afterTaskDelegatedEvent(TaskEvent event); | ||
public interface TaskLifeCycleEventListener extends org.kie.api.task.TaskLifeCycleEventListener { | ||
|
||
} |
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
47 changes: 47 additions & 0 deletions
47
jbpm-runtime-manager/src/main/java/org/jbpm/runtime/manager/api/GlobalProducer.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,47 @@ | ||
/* | ||
* Copyright 2013 JBoss Inc | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.jbpm.runtime.manager.api; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* Allows to provide global instances for <code>KieSession</code> to be registered on time when <code>RuntimeEngine</code> | ||
* is created. | ||
* <br/> | ||
* It will be invoked by RegisterableItemsFactory implementation (especially InjectableRegisterableItemsFactory | ||
* in CDI world) for every KieSession. | ||
* | ||
*/ | ||
public interface GlobalProducer { | ||
|
||
/** | ||
* Returns map of (key = global name, value global instance) of globals | ||
* to be registered on KieSession | ||
* <br/> | ||
* Parameters that might be given are as follows: | ||
* <ul> | ||
* <li>ksession</li> | ||
* <li>taskService</li> | ||
* <li>runtimeManager</li> | ||
* </ul> | ||
* | ||
* @param identifier - identifier of the owner - usually RuntimeManager that allows the producer to filter out | ||
* and provide valid instances for given owner | ||
* @param params - owner might provide some parameters, usually KieSession, TaskService, RuntimeManager instances | ||
* @return map of work item handler instances (recommendation is to always return new instances when this method is invoked) | ||
*/ | ||
Map<String, Object> getGlobals(String identifier, Map<String, Object> params); | ||
} |
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
Oops, something went wrong.