You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

What is it for?

  • Joget Workflow provided Bean Shell implementation as several Plugin Types. Please refer to usages section.
  • BeanShell is a small, embeddable Java source interpreter with object scripting language features written in Java.
  • BeanShell dynamically executes standard Java syntax in runtime.
  • By using BeanShell Plugin, you can type in valid Java codes in plugin configuration and the statements will be executed when the plugin is triggered.
  • No compilation cycle is needed.

What is the code syntax?

Usages

Use as Form Load Binder

Injected Variables:

    • element - Element that this binder is tie to. (org.joget.apps.form.model.Element)

    • primaryKey - The primary key provided by the element to load data. (java.lang.String)

    • formData - The data holder of the whole form. (org.joget.apps.form.model.FormData)

Expected Outcome:

    • An org.joget.apps.form.model.FormRowSet object which contains one org.joget.apps.form.model.FormRow object. 

Samples:

Use as Form Options Binder

Injected Variables:

    • element - Element that this binder is tie to. (org.joget.apps.form.model.Element)
    • primaryKey - The primary key provided by the element to load data. (java.lang.String)
    • formData - The data holder of the whole form. (org.joget.apps.form.model.FormData)

Expected Outcome:

    • An org.joget.apps.form.model.FormRowSet object which contains one or more org.joget.apps.form.model.FormRow object. All FormRow objects are expected to have "value" and "label" property.

Samples:

Use as Form Ajax Options Binder

Injected Variables:

    • values - Dependency values of the controlling field. (java.lang.String[])

Expected Outcome:

    • An org.joget.apps.form.model.FormRowSet object which contains one or more org.joget.apps.form.model.FormRow object. All FormRow objects are expected to have "value" and "label" property.

Samples:

Use as Form Store Binder

Injected Variables:

    • element - Element that this binder is tie to. (org.joget.apps.form.model.Element)
    • rows - Data to be store. Contains only one org.joget.apps.form.model.FormRow object. (org.joget.apps.form.model.FormRowSet)
    • formData - The data holder of the whole form. (org.joget.apps.form.model.FormData)

Expected Outcome:

    • Same org.joget.apps.form.model.FormRowSet object which stored.

Samples:

Use as Form Validator

Injected Variables:

    • element - Element that this validator is tie to. (org.joget.apps.form.model.Element)
    • values - The submitted values of the element. (java.lang.String[])
    • formData - The data holder of the whole form. (org.joget.apps.form.model.FormData)

Expected Outcome:

    • A boolean value to indicate the validation pass or fail.

Samples:

Use as Form Multi Row Load Binder

Injected Variables:

    • element - Element that this binder is tie to. (org.joget.apps.form.model.Element)
    • primaryKey - The primary key provided by the element to load data. (java.lang.String)
    • formData - The data holder of the whole form. (org.joget.apps.form.model.FormData)

Expected Return Object:

    • An org.joget.apps.form.model.FormRowSet object which contains one or more org.joget.apps.form.model.FormRow object. 

Samples:

Use as Form Multi Row Store Binder

Injected Variables:

    • element - Element that this binder is tie to. (org.joget.apps.form.model.Element)
    • rows - Data to be store. Contains one or more org.joget.apps.form.model.FormRow object. (org.joget.apps.form.model.FormRowSet)
    • formData - The data holder of the whole form. (org.joget.apps.form.model.FormData)

Expected Return Object:

    • Same org.joget.apps.form.model.FormRowSet object which stored.

Samples:

Use as Form Multi Row Validator

Injected Variables:

    • element - Element that this validator is tie to. (org.joget.apps.form.model.Element)
    • rows - Submitted data. Contains one or more org.joget.apps.form.model.FormRow object. (org.joget.apps.form.model.FormRowSet)
    • formData - The data holder of the whole form. (org.joget.apps.form.model.FormData)

Expected Return Object:

    • A boolean value to indicate the validation pass or fail.

Samples:

Use as Form Permission

Injected Variables:

Expected Return Object:

Samples:

Use as Form Post Submission Processing Tool

Injected Variables:

Expected Return Object:

Samples:

Use as Process Participant

Injected Variables:

Expected Return Object:

Samples:

Use as Process Tool 

Injected Variables:

Expected Return Object:

Samples:

Use as Userview Permission

Injected Variables:

Expected Return Object:

Samples:

 

Best Practices

 

  • No labels