JFrame in the Portal

Hello,

  1. How can i open a JFame on the portel. Now i am usin a script task with this code :

    import javax.swing.JFrame;

JFrame frame=new JFrame(“console”);
frame.setVisible(true);
frame.setSize(600, 400);

But it doesn’t works ! I get this error

Caused by: java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173)
at java.awt.Window.(Window.java:547)
at java.awt.Frame.(Frame.java:419)
at javax.swing.JFrame.(JFrame.java:218)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:534)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
at Script1.run(Script1.groovy:3)
at org.bonitasoft.engine.expression.impl.GroovyScriptExpressionExecutorCacheStrategy.evaluate(GroovyScriptExpressionExecutorCacheStrategy.java:97)

You will find a useful example of Shell script here: http://community.bonitasoft.com/blog/how-use-script-connector-bonita-bpm-6

Hello,
what is the objective - do you want to have this iframe in a form on a human task? When do you want to present this to your users and where?
Can iFrame widget help you?

What I want is to launch a shell script (that i put in script task) and show the result to user in the next task .
Is it possible ?

Can you make some exemple please ! In my case i want to connet on server so i am using this code

ssh login@IpServer

I want to display the state of connection for exemple in the next task !

Thank you it works. But the problem now is the fact that when i connect to the server in the first script task, i loose this connection in the second script task, so i dont have a continious connection between script tasks . Every time i have to write the shell loggin srcript.

Is there any way to handle this ?