[jboss-user] [jBPM Users] - Re: How to use timers?

2009-11-23 Thread ardavan
Nice explanation Ronald !

Mauromol, make sure you have:

  |  
  | 
in your jbpm.cfg.xml




View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267141#4267141

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267141
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - Re: Sending mail to multiple actors in AssignmentHandler...

2009-05-27 Thread ardavan
That's what I wanted to hear  

Thanks Kukeltje ;-)

A

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233654#4233654

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233654
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - Sending mail to multiple actors in AssignmentHandler...

2009-05-20 Thread ardavan
Hi

I am using a jbpm "mechanism" to send email.
I am using it in an AssignmentHandler:

   String groupNameId = 
  |   ldapService.assignTaskToGroup(GROUPNAME, code);
  | assignable.setPooledActors(new String[] { groupNameId });
  | System.out.println("Assigned to " + groupNameId);
  | 
  | // Send email to each user in the group
  | String to = ldapService.getGroupMembersEmail(groupNameId);
  | CustomMail mail = new CustomMail("task-assign",null, to, null, 
null);
  | mail.execute(executionContext);
  | 

I just wanted to know if I'm not doing anything bad.

thank you

Ardavan

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232294#4232294

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232294
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - Re: ActorId & PooledActors

2009-04-16 Thread ardavan
Thank you my friend.
There was an issue in my query. Now I am using this query and get the right 
information.

public List findEndedPooledTaskInstancesByName(List actorIds) {
  | JbpmContext jbpmContext = 
Tools.jbpmConfiguration.createJbpmContext();
  | try {
  | List taskList;
  | Query query = 
  | getSession(jbpmContext).createQuery("select distinct ti\n" 
+ 
  | "  from org.jbpm.taskmgmt.exe.PooledActor pooledActor 
"+ 
  | "   join pooledActor.taskInstances ti " + 
  | "  where pooledActor.actorId in ( :actorIds ) " + 
  | "and ti.actorId != null " + 
  | "and ti.end != null");
  | query.setParameterList("actorIds", actorIds);
  | taskList = query.list();
  | return taskList;
  | } finally {
  | jbpmContext.close();
  | }
  | }



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225960#4225960

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225960
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - Re: ActorId & PooledActors

2009-04-14 Thread ardavan
Thanks for your answer Swatis.
I am traveling around and don't have access to jBPM code for now on.

My issue is:

First by implementing the AssignmentHandlerInterface and using:
assignable.setPooledActors(new String[] { groupNameId });
I assign a taskinstance to a group of people.


When a userA wants to "end" the taskInstance, the code is:
taskInstance.setActorId("userA");
taskInstance.end();

After when I run a simple query looking for taskInstances that are ended and 
have pooledActors equal to groupNamedId, I have no results;
as if my taskInstance.getPooledActors was equal to null.

Is it comprehensible?


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225371#4225371

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225371
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - ActorId & PooledActors

2009-04-13 Thread ardavan
Hi everyone,

Can a TaskInstance object  have a value for the: 
String actorId  

variable and at the same time for the

String[] actorIds  variable?

or when you set the actorId to some value then you can't have any "pooled 
actors".

Thank you

Ardavan

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225200#4225200

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225200
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - Using LDAP: can't assign tasks to users in group ...

2008-12-18 Thread ardavan
Hi,
I am trying to hook up LDAP with jbpm. Therefore I have my own implementation 
of the ExpressionSession interface.
I also have an AssignmentHandler which extends ExpressionAssignmentHandler.

My problem: my task using: swimlane="manager" is assigned to 'null'.

This is how I set up my swimlanes in my processdefinition file:

 
  |   
  |user(ardi)
  |   
  |  
  |  
  |  
  |   
  |group(groupTest)
  |   
  |  

With the   user(ardi) I have no issues but when I want 
to assign my task to the users in a group using  
group(groupTest) - jbpm assigns the taskInstance to 
null.

I have a  public Group getGroupByName(String groupName)   method that searches 
and finds the right group (LDAP)
then creates the group group = new Group(groupName, "");

Then lists all the members of that group and adds membership
 
  | Attribute memberAttr = groupAttrs.get("uniquemember");for 
(NamingEnumeration memberValues = memberAttr.getAll(); memberValues.hasMore();) 
  | {
  |   String memberValue = memberValues.next().toString();
  | 
  |User user;  
  |user = getUser(memberValue);
  |System.out.println("user name from group:" + user.getName());
  |Membership.create(user, group);
  | System.out.println("membership created between:" + 
user.getName() +" and " + group.getName());
  | }
  | 
I don't know what's wrong - I think I still don't understand the identity 
component of jbpm. 
please help. 

thank you
Ardi

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197455#4197455

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197455
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - Re: Does AssignmentHandler work within the start node??

2008-11-26 Thread ardavan
Thank you for your reply Martin.

I checked the javadoc - I believed that at the creation of my TaskInstance 
object,  the actorID parameter would be null 
but that because this assertion is true:

  | TaskInstance taskInstance = createNewProcessInstance();
  | assertEquals("taskSubmission", taskInstance.getName()); 
  | 
which shows that I am in the "taskSubmission" node

  | 
  |
  | 
  | 
my jbpm.taskmgmt.EmiliAssignmentHandler would set the null actorId to "emili".

Nevertheless now this is the way that I am doing it:

  | public void testSubmissionTask3(){
  | GraphSession graphSession = jbpmContext.getGraphSession();
  | ProcessDefinition processDefinition = 
  | graphSession.findLatestProcessDefinition("test");
  | processInstance = 
  | new ProcessInstance(processDefinition);
  | contextInstance = processInstance.getContextInstance();
  | Task t = 
processInstance.getTaskMgmtInstance().getTaskMgmtDefinition().getTask("taskSubmission");
  | TaskInstance ti = 
processInstance.getTaskMgmtInstance().createTaskInstance(t,processInstance.getRootToken());
  | assertEquals("emili", ti.getActorId());
  | }
  | 
I hope it is correct

Danke schoen
Ardavan

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192505#4192505

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192505
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - Does AssignmentHandler work within the start node??

2008-11-25 Thread ardavan
Hi,
I can't assign the actorid that I want for a simple start node:
As a test case I am using a simple processdefinition:


  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 

My issue is within the task: "taskSubmission"  f the start node and the class 
"EmiliAssignmentHandler":


  | package jbpm.taskmgmt;
  | import org.jbpm.graph.exe.*;
  | import org.jbpm.taskmgmt.def.*;
  | import org.jbpm.taskmgmt.exe.Assignable;
  | 
  | public class EmiliAssignmentHandler implements AssignmentHandler {
  | 
  |   private static final long serialVersionUID = 1L;
  |   public void assign(Assignable assignable, ExecutionContext 
executionContext) {
  | assignable.setActorId("emili");
  |   }
  | }
  | 

I run the JUNIT test:

  | + the correct imports...
  | 
  | public class TestCase2 extends junit.framework.TestCase {
  | 
  | static JbpmConfiguration jbpmConfiguration = 
  | JbpmConfiguration.parseResource("jbpm.cfg.xml");
  | 
  | ... variables ...
  | public void setUp() {
  | ... same as in jbpm examples 
  | }
  | 
  | public void tearDown() {
  | ... same as in jbpm examples
  | }
  | 
  | private void newTransaction() {
  | ... same as in jbpm examples
  | }
  | 
  | private void deployProcess() {
  | ... same as in jbpm examples
  | }
  | 
  | private TaskInstance createNewProcessInstance() {
  | GraphSession graphSession = jbpmContext.getGraphSession();
  | ProcessDefinition processDefinition = 
  | graphSession.findLatestProcessDefinition("test");
  | processInstance = 
  | new ProcessInstance(processDefinition);
  | processInstanceId = processInstance.getId();
  | contextInstance = processInstance.getContextInstance();
  | taskMgmtInstance = processInstance.getTaskMgmtInstance();
  | return 
processInstance.getTaskMgmtInstance().createStartTaskInstance();
  | }
  | 
  | public void testStartSubmissionParameters() {
  | TaskInstance taskInstance = createNewProcessInstance();
  | assertEquals("taskSubmission", taskInstance.getName());
  | assertEquals(0, taskInstance.getVariables().size());
  | }
  | 
  | public void testSubmissionTask(){
  | TaskInstance taskInstance = createNewProcessInstance();
  | taskInstance.setActorId("emili");
  | taskInstance.end();
  | assertEquals("emili", taskInstance.getActorId());<WORKS
  | List emiliTasks = 
jbpmContext.getTaskMgmtSession().findTaskInstances("emili");
  | assertEquals(0, emiliTasks.size());
<WORKS
  | }
  | 
  | public void testSubmissionNotWorking(){
  | // create a task to start the test process
  | TaskInstance taskInstance = createNewProcessInstance();
  | assertEquals("emili", taskInstance.getActorId());<PROBLEM
  | taskInstance.end();
  | }
  | }
  | 

Why does taskInstance.getActorId() in method testSubmissionTask() equal null 
where it should be equal to "emili" because of the EmiliAssignmentHandler  
class in the "taskSubmission" start node 

thank you for your help
Ardavan

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192287#4192287

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192287
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user