...
...
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
What are we going to build?
...
The client is packaged as an executable Java JAR that includes all of the required dependencies and you can download the binaries from here and the sources from here.
Running the command-line client
Assuming that you have a Java Runtime Environment (JRE (update 21+) or JDK versions 1.6, 1.7), you can run the client as follows:, replacing 'com.frevvo.forms.cli.jar' with the current jar filename, e.g. 'forms-cli-10.0.17.jar'.
Code Block |
---|
java -jar com.frevvo.forms.cli.jar |
...
So you if you want to connect to a install frevvo install running on localhost you can do as follows:, replacing 'forms-cli.jar' with the current jar filename.
Code Block |
---|
java -jar forms-cli.jar com.frevvo.forms.cli.Main -s http://localhost:8082 |
...
This means that you are up and running, but not yet connected. First you need to log in to a frevvo account. Be sure to create at least one tenant and one user for the tenant before you try to log in. See Connect to a Server and Log In below for instructions.
How are the sources organized?
...
The following topics show how to log in to the server frevvo server and use the command line API to interact with the server, projects, and forms and workflows.
...
The example below shows how to log in to a local serverfrevvo server. In this example, the login user name is david, the name of the tenant is monahan.com, and the user password is david (e.g., login david@monahan.com david).
Note |
---|
To login, you must first create a tenant on the server (other than the default d tenant). You You should also create a user such as a frevvo.designer or an admin userwith the role frevvo.designer who can create projects. |
Code Block |
---|
Directory of D:\frevvo v4.1.4 08/05/2011 08:59a <DIR> . 08/05/2011 08:59a <DIR> .. 08/05/2011 08:59a 3,044,609 com.frevvo.forms.cli.jar 07/12/2011 09:20a <DIR> frevvo 1 File(s) 3,044,609 bytes 3 Dir(s) 7,803,990,016 bytes free D:\frevvo v4.1.4>java -jar com.frevvo.forms.cli.jar usage: com.frevvo.forms.cli.Main -s,--server <arg> serverl url (e.g. http://localhost:8082) -t,--tenant tenant (optional, e.g. doe.com) D:\frevvo v4.1.4>java -jar com.frevvo.forms.cli.jar -s http://localhost:8082 localhost:8082> ?list Name Abbr ArgNum Descr login l 1 login(username:String) : String login l 2 login(username:String, password:String) : String login-as la 2 loginAs(username:String, tenantAdmin:String) : String login-as la 3 loginAs(username:String, tenantAdmin:String, tenantAdminPassword:String) : String print p 0 print() : String localhost:8082> login david@monahan.com david ---------------------------------------------------------------------------------------- ID | david URL | http://localhost:8082/frevvo/web/tn/monahan.com/api/user/david UPDATED | 2011-08-05T09:52:45.510-04:00 NAME | david DESCRIPTION | null ---------------------------------------------------------------------------------------- |
...
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 frevvo UI displays the projects belonging to the user david@monahan.com on the projects home page.
The apps command displays a list of the projects in the tenant on the server — DTM July 2011'and DTM August 2011 in this example.
...
You can use the apps > down and up commands to download projects to a local drive and upload them to the serverfrevvo server.
Download
In the UIfrevvo UI, you can download projects individually, and select the destination directory.
In this example, down downloads all the 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 project, you must first select it. See the Downloading and Uploading a Form/Workflow topic for instructions for selecting a 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 |
...
...
...
...
Upload
In the UIfrevvo UI, you can upload projects from the projects page.
In this example, up uploads a single project into the tenant. Note that we moved the ZIP files we downloaded in the previous step to a different directory before using up.
...
As with downloading projects, in the UIfrevvo UI, you can download individual forms and workflows and select the destination directory when you're editing a project on the projects home page.
In this example, down downloads all the forms and 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
...
You can use the forms> create command to create a new form or a workflow. You first select the project to which you want to add the new form, list its forms, and then create the form.
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> select 2 ----------------------------------------------------------------------------------------- ID | _5Crikb-LEeCP198_WwQSNw!david URL | http://localhost:8082/frevvo/web/tn/monahan.com/api/app/_5Crikb-LEeCP198_WwQSNw!david UPDATED | 2011-08-10T10:22:56.851-04:00 NAME | DTM August 2011 DESCRIPTION | Forms started in August. ----------------------------------------------------------------------------------------- localhost:8082/david@monahan.com/apps/DTM August 2011> forms ----------------------------------------------------------------------------------------- URL ! http://localhost:8082/frevvo/web/tn/monahan.com/api/formtypes # | UPDATED | KIND | READONLY | VISIBILITY | NAME 1 | 2011-08-05T13:54:58.628 | FORM | false | PRIVATE | Contact Form 2 | 2011-08-09T15:29:47.477 | FORM | false | PRIVATE | NewForm 3 | 2011-08-09T15:56:23.552 | FORM | false | PRIVATE | LodgingMeals ----------------------------------------------------------------------------------------- localhost:8082/david@monahan.com/apps/DTM August 2011/forms> create 'TestForm' ----------------------------------------------------------------------------------------- ID | _X9B3YMNcEeCRfoJ9kSWZ1Q!_5Crikb-LEeCP198_WwQSNw!david URL | http://localhost:8082/frevvo/web/tn/monahan.com/api/formtype/_X9B3YMNcEeCRfoJ9kSWZ1Q!_5Crikb-LEeC P198_WwQSNw!david UPDATED | 2011-08-10T10:23:53.442 NAME | TestForm DESCRIPTION | Edit the form to change this description. KIND | FORM READONLY | false VISIBILITY | PRIVATE ----------------------------------------------------------------------------------------- localhost:8082/david@monahan.com/apps/DTM August 2011/forms/TestForm> |
...
Note |
---|
The command prompt includes the new form name (''../forms/TestForm>''), so you can Downloading and Uploading a Form/Workflow from the command line at this point. |
...
To edit a form, you first select the project the form belongs to, and then select the form you want. See Downloading and Uploading a Form/Workflow for instructions on selecting a project.
...
Code Block |
---|
localhost:8082/david@monahan.com/apps/DTM July 2011/forms/Address Book> edit Editing form: http://localhost:8082/frevvo/web/tn/monahan.com/user/david/app/_W0jPga4rEeCMGZK99v93jw/formtype/_fNScEK4rE eCMGZK99v93jw?edit=true&embed=true&_method=post&apikey=IIGGTVxO1DtiDmUSnIiLzmXQjd6SGJ5c%252FpLVUNm%252FKE8AWzjV0xakncsLK l2aocCYxj3lHuYWNr5q4Su8O%252FQlyQ%253D%253D localhost:8082/david@monahan.com/apps/DTM July 2011/forms/Address Book> |
You can edit the form in the designer as if you had logged in through the UI. Make any changes you want to the form, and then click Finish or Cancel to exit the designer. You return to the UI login page.
...
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/Workflow topic above for instruction on selecting a form. Then simply type use at the command prompt and press Enter. opens frevvo opens the form or workflow in your browser.
...
After you select a form, you can display a list of all the controls in the form. See the Editing a Form/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.
...
Now, the purchaseorder.xsd has been upload and you can verify that this is the case by going directly to the UI frevvo UI in Projects->Schemas.
Add an new XSD data source to a form
...
Now that we have a new form, we need to add a new XSD data source to the form using the API, which is the equivalent to adding a new data source in the designer by clicking the Data Sources panel and then clicking New from XSD as shown in the following screenshots.
displays frevvo displays the available schemas in the current project. You can then click to select the XSD you want to use. adds frevvo adds it to the Data Sources panel.
...
Click
You can now use the new form from the command line.
...