-
1. Re: Does data In(jection) occur before or after @Create
gavin.king Jul 17, 2007 9:22 AM (in response to harpritt)Injected attributes are available during @Create methods, yes.
-
2. Re: Does data In(jection) occur before or after @Create
harpritt Jul 17, 2007 9:37 AM (in response to harpritt)nice one Mr King..... i must be cocking somthing else up.....
Cheers again
H -
3. Re: Does data In(jection) occur before or after @Create
harpritt Jul 17, 2007 5:48 PM (in response to harpritt)Gavin
Sorry to keep buggin you, but can you point me in the direction of an example showing how to bind to the BP ctx and then retrive in the @create
Ive done everything that i can , but the damn inject values are allways null....
@Out(scope=BUSINESS_PROCESS, required = false)
String aString
.... aString = "WooooHoooo"
and then
@Create
doYourStuff(){
System.out.print(aString);
}
..... i cant see where im screwing up
a pointer in the right direction or example will be ample to see me through this.
Cheers again -
4. Re: Does data In(jection) occur before or after @Create
gavin.king Jul 17, 2007 6:42 PM (in response to harpritt)Where is @In?
-
5. Re: Does data In(jection) occur before or after @Create
harpritt Jul 17, 2007 7:07 PM (in response to harpritt)Hi
I have this SFSB that handles a two page conversations, assigns a value to the crId and also kicks off a @CreateProcess when the @End on the conversation is called.@Stateful @Name("createChangeRequest") public class CreateChangeRequestAction implements CreateChangeRequest { @In(required = false) @Out(scope = BUSINESS_PROCESS, required = false) ChangeRequest changerequest; @Out(scope = BUSINESS_PROCESS, required = false) String crId;
And this SFSB that takes care of the process and tries to call the crId that was added to the Business Process scope above.
for some reason the crID never seems to get added to the BP context.... until i restart the server.....@Stateful @Name("ticketSystem") public class TicketSystemAction implements TicketSystem { @In() @Out() String crId; @In() @Out() ChangeRequest changerequest; @In(required = false) RequestState requestState; @Create public void findit(){ System.out.println("crId"); }
it really bugs me when i cant get somthing to work.... OCD boy right here!
Cheers for any help -
6. Re: Does data In(jection) occur before or after @Create
harpritt Jul 17, 2007 7:32 PM (in response to harpritt)I wonder if this has to do with the fact that the BP tasks are atomic and that the business scoped modifications are only commited when a task completes..
this would explain why the crID is null... maybe... straws clutch clutch... SLEEEEEEEPPPPPPP -
7. Re: Does data In(jection) occur before or after @Create
harpritt Jul 18, 2007 5:11 AM (in response to harpritt)I think i know what the problem is
im setting the value for a business scoped variable inside a method annotated with
@CreateProcess(definition = "changerequestprocess")
and trying to access it in @Create before ive entered the first task.
Am i on the right track.?