Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Column

This tutorial will walk you through a few API scenarios focusing on the design-time integration such as creating new forms, listing and managing applicationsprojects, launching the designer for a flowworkflow, downloading schemas, applicationsprojects, forms and flowsworkflows, download the XSD for a form/flowworkflow, uploading custom XSDs, using forms and flowsworkflows.

Note

In v9.1 and later 's "Applications" are known as "Projects." The API objects and methods still use the word Application.

Column
width240px30%

On this page:

Table of Contents
maxLevel1

 

...

The following topics show how to log in to the  server and use the command line API to interact with the server, applicationsprojects, and forms and flowsworkflows.

Connect to a Server and Log In

...

After you've logged in, use ?list to display commands you can use in the server. For example, you can use apps to work with the applications projects on the server.

Code Block
localhost:8082/david@monahan.com> ?list

Name     Abbr     ArgNum     Descr
apps                0        SELECT apps for this user (e.g. 'apps')
subs                0        SELECT subs for this user (e.g. 'subs') you
tasks               0        SELECT tasks for this user (e.g. 'tasks')
themes              0        SELECT themes for this user (e.g. 'themes')
link      l         1        OPEN a link in the browser (e.g. 'link {link#}')
descr     d         1        UPDATE this entry's description (e.g. 'descr {newDescription}')
links     l         0        SHOW all entry links (e.g. 'links')
links     li        1        SHOW feed links for given rel attr (e.g. 'links {relAttr}')
name      n         1        UPDATE this entry's name (e.g. 'name {newName}')
print     p         0        PRINT this entry (e.g. 'print')
delete    d         0        DELETE this entry (e.g. 'delete')
refresh   r         0        REFRESH this entry (e.g. 'refresh')

The  UI displays the applications projects belonging to the user david@monahan.com on the applications projects home page.

The apps command displays a list of the applications projects in the tenant on the server — DTM July 2011'and DTM August 2011 in this example.

...

Code Block
localhost:8082/david@monahan.com/apps> ?list
Name    Abbr     ArgNum     Descr
up                 1        UPLOAD an application (e.g. 'up /var/contacts_apps.zip')
down               0        DOWNLOAD ALL applications into temp folder (e.g.: 'download')
link     l         1        OPEN a link in the browser (e.g. 'openLink {link#}')
links    li        1        SHOW feed links for given rel attr (e.g. 'links {relAttr}')
links    l         0        SHOW all feed links (e.g. 'links')
next     n         0        NEXT feed page (e.g. 'next')
prev     p         0        PREVIOUS feed page (e.g. 'previous')
print    pr        0        PRINT current feed (e.g.: 'print')
delete   d         1        DELETE an entry (e.g. 'delete {entry#}')
create   c         1        CREATE a new entry (e.g.: 'create {name}')
refresh  r         0        REFRESH current feed (e.g.: 'refresh')
select   s         1        SELECT an entry (e.g.: 'entry {entry#}')

Downloading and Uploading

...

Projects

You can use the apps > down and up commands to download applications projects to a local drive and upload them to the  server.

...

In the  UI, you can download applications projects individually, and select the destination directory.

...

In this example, down downloads all the applications projects in the tenant to a directory on the local machine. Since down takes no arguments, the target directory depends on your local machine settings.

Note

To download a single applicationproject, you must first select it. See the Downloading and Uploading a Form/FlowWorkflow topic for instructions for selecting and applicationa project.

Code Block
localhost:8082/david@monahan.com/apps> down

Downloaded 2 application(s):
        Downloaded application DTM July 2011: C:\DOCUME~1\esposito\LOCALS~1\Temp\DTMJuly2011_8805120088410548632_app.zip
        Downloaded application DTM August 2011: C:\DOCUME~1\esposito\LOCALS~1\Temp\DTMAugust2011_7848214203496988467_app.zip

...

In the  UI, you can upload applications projects from the applications projects page.

In this example, up uploads a single application project into the tenant. Note that we moved the ZIP files we downloaded in the previous step to a different directory before using up.

...

Note

After the upload, the command prompt now includes the name of the uploaded application project (''../apps/DTM August 2011''). Use the ?list command to see what you can do with the applicationproject.

Source Code Example 

Java Docs

Downloading and Uploading a Form/

...

Workflow

You can use the forms > down and up commands to download forms and flows workflows to a local drive and upload them to the frevvo server.

Before you can use the commands, you have to select the application project whose forms you want to work with. In this example, we use the apps command to list the applications projects in the tenant, and then select to select the application project we want (e.g., select 1 — select the first application project in the list).

Code Block
localhost:8082/david@monahan.com> apps
-----------------------------------------------------------------------------------------
URL ! http://localhost:8082/frevvo/web/tn/monahan.com/api/apps
    # | NAME                                 | DESCRIPTION
    1 | DTM July 2011                        | Group of test forms created by DTM.
    2                                        | DTM August 2011 | Forms started in August.
-----------------------------------------------------------------------------------------
localhost:8082/david@monahan.com/apps> ?list

Name     Abbr    ArgNum     Descr
up                  1       UPLOAD an application (e.g. 'up /var/contacts_apps.zip')
...
...
...
select    s         1       SELECT an entry (e.g.: 'entry {entry#}')
localhost:8082/david@monahan.com/apps> select 1
-----------------------------------------------------------------------------------------
                     ID | _W0jPga4rEeCMGZK99v93jw!david
                    URL | http://localhost:8082/frevvo/web/tn/monahan.com/api/app/_W0jPga4rEeCMGZK99v93jw!david
                UPDATED | 2011-08-08T09:00:41.319-04:00
                   NAME | DTM July 2011
            DESCRIPTION | Group of test forms created by DTM.
-----------------------------------------------------------------------------------------
localhost:8082/david@monahan.com/apps/DTM July 2011>

The command prompt now includes the selected application project DTM July 2011'. Use the forms command to see a list of the forms and flows workflows in the applicationproject, and then use ?list to see what you can do with them.

...

Download

As with downloading applicationsprojects, in the  UI, you can download individual forms and flows workflows and select the destination directory when you're editing an application a project on the applications projects home page.

In this example, down downloads all the forms and flows workflows in the tenant to a directory on the local machine. You can't choose which forms to download, and since down takes no arguments, the target directory depends on your local machine settings. Since the command downloads

...

Java Docs

Upload

As with uploading applicationsprojects, in the frevvo UI, you can upload forms and flows workflows from the applications projects page when you're editing an applicationa project.

In this example, up uploads a single form — the ''TitleDepartment'' form — into the tenant. Note that we moved the ZIP files we downloaded in the previous step to a different directory before using '''up'''.

...

Source Code Example

Java Doc

Creating a Form/

...

Workflow

You can use the forms> create command to create a new form or a flowworkflow. You first select the application project to which you want to add the new form, list its forms, and then create the form.

...

Note

The command prompt includes the new form name (''../forms/TestForm>''), so you can Downloading and Uploading a Form/FlowWorkflow from the command line at this point.

Source Code Example

Java Docs

Editing a Form/

...

Workflow

To edit a form, you first select the application project the form belongs to, and then select the form you want. See Downloading and Uploading a Form/FlowWorkflow for instructions on selecting an applicationa project.

Once you've gotten to the application project you want, you can use the forms command to see what forms it contains and use ?list to see what you can do with them. In the example below, we use select 1 to select the first form in the list (Address Book).

...

Source Code Examples

Java Doc

Using a Form/

...

Workflow

Once you've selected a form, you can use it; this is, you can run the form as an end-user would. See the Editing a Form/Flow Workflow topic above for instruction on selecting a form. Then simply type use at the command prompt and press Enter.  opens the form or flow workflow in your browser.

Code Block
localhost:8082/david@monahan.com/apps/DTM July 2011/forms/Address Book> use

Using form: http://localhost:8082/frevvo/web/tn/monahan.com/user/david/app/_W0jPga4rEeCMGZK99v93jw/formtype/_fNScEK4rEeC
MGZK99v93jw?embed=true&_method=post&apikey=IIGGTVxO1DtiDmUSnIiLzmXQjd6SGJ5c%252FpLVUNm%252FKE8AWzjV0xakncsLKl2aocCYxj3lH
uYWNr5q4Su8O%252FQlyQ%253D%253D

localhost:8082/david@monahan.com/apps/DTM July 2011/forms/Address Book>

...

After you select a form, you can display a list of all the controls in the form. See the Editing a Form/Flow Workflow topic above for instruction on selecting a form. Then simply type controls at the command prompt and press Enter. You see the list of controls.

...

You can download and upload the schema (XSD file) for a form. In the frevvo UI, you download a form schema from the application project page when you're editing an applicationproject; you upload a schema from the schema page.

...

After you select a form in an applicationproject, you can use the [form-name]> newXml command to create an instance of the form and fill the form with data values from an XML file. You can then submit the form, or reset it to remove the XML data.

...

You can use an XSD schema file to populate a form with controls. You can add the entire XSD schema to the form or individual controls. This example uses the API to upload a custom schema to an applicationa project, add one of the top-level XSD elements to a form and then shows the result in the designer UI.

...

The first step is to upload a custom XSD into an applicationa project. The following commands will list the existing schemas in the current application project and then upload a new one (this assumes that there is an XSD named purchaseorder.xsd located in the /xsd folder):

...

Now, the purchaseorder.xsd has been upload and you can verify that this is the case by going directly to the  UI in ApplicationsProjects->Schemas.


Add an new XSD data source to a form

...

 displays the available schemas in the current applicationproject. You can then click  to select the XSD you want to use.  adds it to the Data Sources panel. 

...