Integration with ASP.Net

  • 12 August 2008
  • 3 replies
  • 4 views

Badge +3

Hi,


Could anybody please let me know how we will do the intgration with ASP.Net pages.


 


3 replies

Badge +8

Hi Ajay, K2 integrates seamlessly with .net, there are lot of examples of how to achieve that in this forum. However general rule of thumb is:

Reference k2 api's in your application (Web/Windows), use API's like SourceCode.Workflow.Client to start/update/finish the process through code.

You can also reference your application assembly in k2 process and then call you application methods in K2 events.

I think good place to start is k2 developer reference, there are good examples on how to start a process, how to set datafields, how to access worklist items etc.

Also do look at projects in black market, they will also help you understand how k2 integrates with .net.

HTH

 

Badge +3

Hi,


I have two destination users in one activity. (say dest1 & dest2 --- These are Roles)


I need to design the workflow in such a way if the amount is less than 2000, the process should go to only dest1 . But if the amount is greater than 2000, the process should go to both the destinations simultaniously and if any one from Dest1 and Dest 2 , rejects the process, then It should not move further and the workItem should get deletted from the other destinaion who has not taken any action.


The process will move further inly if both the dest1 and dest2 will approve the work item.


 Please provide me the feedback on this.


 


Thanks & regards


Ajay Gangwar

Badge +11

Ajay,


This is easy to do.  For the first part of your question regarding sending to different users based on conditions, you want to use Destination Sets.  Destination sets allow you do exactly what you are asking:  conditionally assign destinations based on rules. 


To use destination sets, go into the advanced mode of the activity destination rule wizard.  Run the destination rule wizard, then on the first page press the back button and check the Advanced checkbox.  Now when you move through the wizard you will see additional wizard pages, one of which is for destination sets.  In your example, Ddest1 will always be part of the destination, so you only need the rule for Dest2. 


The second part of your question can be accomplished by changing the Outcome (or succeeding rule).  By default the outcome rule for a client activity will say something like 'All Slots of Action Result = Approved'.  You can adjust the outcome for default to say 'At least one Slot of Action Result = Reject'.  You can find the outcome rules by running the client event wizard.  Note while this will accomplish what you are asking for, it may be more clear to future developers to actually send the reject path to a dummy activity with an appropriate label about stopping the workflow than simply just ending at the client event.


David

Reply