Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
erik1983

New Member
Registered:
Posts: 6
Reply with quote  #1 
Hi All,

First time poster on the forum, but found so much help here i thought this would be my first port of call with an issue i can't seem to get around.

I'm hoping I'm doing something wrong and it's a quick fix.

Basically i want to set the eNote field when an action occurs to store the value of the drop down that is on the form attached to the action (it's a rejection reason).

I've previously been able to set the eNote value by being ProcessContext.ActionNote to a memo field and then it saves automatically.

However if I try using a visual activity to assign the value it doesn't work, also if I use C# it doesn't work either, I've also tried used Javascript to get the value of the drop down box and then set a hidden memo box which was bound to the ProcessContext.

I've tried looking everywhere for some information on this but i can't find anything, any help would be appreciated.

We're using Metastorm 9.1


0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #2 
Absolutely no reason why it would not work. You must be resetting it later, or not setting it to what you believe you are.

Can sou share an example?

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
erik1983

New Member
Registered:
Posts: 6
Reply with quote  #3 
Hi Jerome,

Thanks for the quick response...literally as you responded I think i found my mistake

I've been using the following code

ProcessContext.ActionNote = "Test";

Where I'm guessing I should be using something like the following instead?

ProcessContext thisProcessContext = new ProcessContext();
thisProcessContext.ActionNote ="test";

Unless I'm completely off the mark?


0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #4 
No, ProcessContext.ActionNote = "Test"; is correct.

You need to create a new one in a server script (as opposed to a VS code activity:

new ProcessContext().ActionNote = "Test";

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
erik1983

New Member
Registered:
Posts: 6
Reply with quote  #5 
Hi Jerome,

That's great thanks for your help, I've created a Server Side script and promoted it as a VS

Thanks for your help been boggling me for a while/
0
erik1983

New Member
Registered:
Posts: 6
Reply with quote  #6 
Sorry follow up question...

I've been playing with my VS and I've tried to adapt it so i can pass in a parameter to set the note content.

I've created a form which has a memo field on it, which is a local variable and then pass this through as a paremeter to the below VS when the command button is clicked.

It does not error but at the same time the note is not set, my guess is either the VS/form can't see the process content to set it or the action completed event is setting back to blank, has anyone got any ideas how to get around this.


[Promote(PromotionTargets.VisualToolbox)]
[Category("Plus Dane Services")]
public static void addNote(string note)
{
     new ProcessContext().ActionNote = note;
}

p.s. I'm basically trying to allow the user to set the action note so they some small notes
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!