#1 2011-08-02 22:45:55

mashah
Member
Registered: 2011-06-26
Posts: 29

how to add jframe in job?

Hi,
I want to use jframe in between the job, which will allow human to do some process before processing forward.
How can I hold execution of my job until user done with their process?
When user will be done with his process, will press "Cancel Button" or will "Close application".
On the action actionPerformed of button event I want to resume execution of my job.

For more detail I have attached snapshot of my job scenario.
I really will appreciate your help.

Thanks.


Uploaded Images

Last edited by mashah (2011-08-02 22:48:55)

Offline

#2 2011-08-03 23:27:24

mashah
Member
Registered: 2011-06-26
Posts: 29

Re: how to add jframe in job?

Can it be possible with the use of context variable?
Can I change value of context variable from routine? If yes than can you please show me how?
Or suggest some another useful way to solve it.

Thanks.

Offline

#3 2011-08-04 01:17:53

alevy
Member
Registered: 2009-11-20
Posts: 1477

Re: how to add jframe in job?

I'm not sure what your exact problem is.

tJava can be used to execute any Java code you want, including calls to routines, at that point in your job execution.  If your code is directly in the tJava, it can modify any context or globalMap variables as usual.  If you need to set a context or globalMap variable using a routine, you'd have to pass a return value from the routine to the tJava where you would assign it to the variable.

If you need to control whether the rest of the job executes based on which button the user clicks, you just need a RunIf from the tJava testing the return value from your code.

Offline

#4 2011-08-04 13:34:41

mashah
Member
Registered: 2011-06-26
Posts: 29

Re: how to add jframe in job?

Hi,
Thanks for the reply and sorry for confusion.
Actually my problem is something like this, I'd like to show jFrame in between the execution of my job for the user to make some changes on their own. I have attached snapshot's of problem which is similar to mine one.

In the first snapshot there is a code of jframe, which I have written in routines called "ButtonPressDemo".
Now I want to call this class from my job, so I used "tJava" as shown in snapshot no 2.
In third snapshot you can see that job run successfully but I was not able to see the jframe.
In fourth one I used "tSleep" component to make my job wait for 60 second, then I was able to see my jFrame for 60 seconds.

I need that when user click on "Aurevoir", (Exit) button then only job should end.

Can you please help me out? Can you show me how can I add whole routine code to tJava?
I'll really appreciate your help.

Thanks.


Uploaded Images

Offline

Board footer

Powered by FluxBB