On this page:
Table of Contents | ||
---|---|---|
|
Note |
---|
In v9.1 and later frevvo's "Applications" are known as "Projects," and "Themes" are known as "Styles." The API objects and methods still use the words application, 'app', and theme. |
...
Warning |
---|
All references to Themes have been removed in version 5.3. This example does not pertain to 5frevvo 5.3 or later. |
Code Block |
---|
FormsService service = ...; ThemeQuery query = service.CreateThemeQuery(null); ThemeFeed themes = service.Query(query); foreach (ThemeEntry theme in themes.Entries) { Console.WriteLine("Theme: " + theme.Title.Text); } |
...
This is often needed when you need to relate a form frevvo form with another concept your application (e.g. you application has the concept of a report that has an associated formfrevvo form). In this case you will store the form id somewhere and when needed fetch the form entry to embed it in your page, delete it, etc.
Here is how you get the for a form entry (in fact any entry):
...
Every FormType always has 1 default DocumentType that cannot be removed. This is the DocumentType managed by and frevvo and updated when controls from the palette are added or removed from the form. For this DocumentType the Delete() method will fail (you can check whether a DocumentType can be deleted or not using the entry's ReadOnly property).
...
Code Block |
---|
FormTypeEntry formTypeEntry = ....; // request all data come back as part of the submit response NameValueCollection linkParams = new NameValueCollection(); linkParams.Add("_formActionDocs", "true"); FormEntry formEntry = formTypeEntry.CreateFormEntry(linkParams); IList<MultipartContentElement> responseData = formEntry.SubmitInstance(); foreach (MultipartContentElement part in responseData) { string dispositionType = part.ContentDispositionType; string name = part.Name; string contentType = part.ContentType; string contentTransferEncoding = part.ContentTransferEncoding; string data = part.DataPayload; } |
Functions only available in the .net api
...
for frevvo v5.3 or later:
Note |
---|
The updates listed here are only available in .net client API version 5.3 or later. Note the Themes api was removed and replaced by the Styles api in frevvo 5.3. All references to Themes have been removed in frevvo 5.3. |
...
There are three options when uploading a workflow or form: Insert, Copy or Replace. You can use a Stream or a file path location when uploading.
Code Block |
---|
string fileName = ....; bool isForm = ....; ApplicationEntry appEntry = ....; // If an entry with the same id already exists, it will be replaced. // Otherwise, the archive will be uploaded with the same id. FormTypeEntry entry = appEntry. FormTypeFeed.UploadAndInsertFormType(filename, isForm); // If an entry with the same id already exists, a copy will be made. // Otherwise, the archive will be uploaded with the same id. FormTypeEntry entry = appEntry.FormTypeFeed.UploadAndCopyFormType(filename, isForm); // If an entry with the same id already exists, it will be replaced. // Otherwise, the archive will be uploaded with the same id. FormTypeEntry entry = appEntry.FormTypeFeed.UploadAndReplaceFormType(filename, isForm); Stream appStream = ....; bool isForm = ....; ApplicationEntry appEntry = ....; // If an entry with the same id already exists, it will be replaced. // Otherwise, the archive will be uploaded with the same id. FormTypeEntry entry = appEntry. FormTypeFeed.UploadAndInsertFormType(appStream,isForm); // If an entry with the same id already exists, a copy will be made. // Otherwise, the archive will be uploaded with the same id. FormTypeEntry entry = appEntry.FormTypeFeed.UploadAndCopyFormType(appStream, isForm); // If an entry with the same id already exists, it will be replaced. // Otherwise, the archive will be uploaded with the same id. FormTypeEntry entry = appEntry.FormTypeFeed.UploadAndReplaceFormType(appStream, isForm); |
...
Code Block |
---|
string signaturePictFile = ....; string signatureXmlFile = ....; string sectionFormXmlFile = ....; string miscFile = ....; FormTypeEntry formTypeEntry = ....; // existing form type from feed Stream wetSig = File.OpenRead(scriptStream); Stream sigXml = File.OpenRead(signatureXmlFile); Stream formXml = File.OpenRead(sectionFormXmlFile); Stream miscFile = File.OpenRead(miscFile); FormEntryBuilder fbe = new FormEntryBuilder(formTypeEntry); fbe.Document("form", formXml); fbe.WetSignature("controlTypeId", wetSig); fbe.DigitalSignature(sigXml); fbe.Attachment("controlTypeId", miscFile); fbe.Data("Name", "some name"); // builds up _data fbe.Parameter("_formTz", "America/New_York"); // adds URL param fbe.FormActionDocs(true); // set _formActionDocs param to return Submission Doc Set FormEntry formEntry = fbe.CreateFormEntry(); IList<MultipartContentElement> responseData = formEntry.SubmitInstance(); foreach (MultipartContentElement part in responseData) { string dispositionType = part.ContentDispositionType; string name = part.Name; string contentType = part.ContentType; string contentTransferEncoding = part.ContentTransferEncoding; string data = part.DataPayload; } |
Functions only available in the .net api
...
for frevvo v6.1.2 or later:
Note |
---|
The updates listed here are only available in .net client API version 6.1.2 or later. |
...
Code Block |
---|
ApplicationEntry testApplication = ....; SchemaEntry testSchema = ....; string fileName = "\path\to\myschema.xsd"; MediaFileSource source = new MediaFileSource(fileName, SchemaFeed.MEDIA_SOURCE_TYPE); testSchema = testApplication.SetupSchema(source, "schemaName-required"); |
Functions only available in the .net api
...
for frevvo v6.1.5 or later:
Note |
---|
The updates listed here are only available in .net client API version 6.1.5 or later. |
...
You can specify who receives an email reporting the upload status when it is done through the API. The email is sent to the "notificationEmailAddress" that is passed in the API. The email may say something like this if there are errors during the upload:
Code Block |
---|
Validation occurred with errors. Users data NOT loaded. Refer to attached CSV data file for validation and/or loading result details. |
...
Ensure the form/workflow submissions you are trying to access has either the userid or Roles that the user is a member of in "Who can view submissions" ACL.
How do I use the Security Manager Built-In Admin?
LDAP, SAML, and SAML Azure Security Managers provide a built-in admin login directly to frevvo, which is helpful if your security manager logins should become inaccessible and you need to access frevvo. This built in admin is automatically enabled from the API when using SAML, but for LDAP it needs to be explicitly enabled by setting the custom property "backdoorLogin" to true in the loginAs call. This will allow the API to login in the same way a built in admin can login using /frevvo/web/admin/login.
Code Block |
---|
service.loginAs("loginAsUser", "adminuser@tenant"), "????", true, null, null, null, null, Map.of("backdoorLogin", "true")); |
...