Versions Compared

Key

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

 

On this page:

...

There are three options when uploading a Flow 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);  

...

Section
Column
width50%
Code Block
/// Add an xml signature to this builder from a given stream

public FormEntryBuilder DigitalSignature(Stream inputStream, string contentType, string
fileName) 
Column
width50%
Note

This method deprecates the previous method:

public FormEntryBuilder DigitalSignature(Stream inputStream, string contentType)

 

 

 

 

 

 

 

 

 

...

Get the Raw Link to the form/flow from the FormTypeEntry:

Code Block
FormTypeEntry fte = ….; 

//Get Raw Link 
AtomLink rawLink = fte.GetFormTypeLink(null);

Add convenience method to upload schema file(s) in zip form:

Code Block
ApplicationEntry testApplication = ....; 
SchemaEntry testSchema = ....;
string zipFileName = "\path\to\myschema.zip";

testSchema =
testApplication.SetupSchemaZip(zipFileName, "rootXSDFileName.xsd",
"schemaName-optional ");

Added convenience method to upload Schema file(s) in .xsd file form:

Code Block
ApplicationEntry testApplication = ....;
SchemaEntry testSchema = ....;
string xsdFileName = "\path\to\myschema.xsd";

testSchema =
testApplication.SetupSchema(xsdFileName, "schemaName-optional"); 

Added convenience method to upload Schema file(s) in MediaSource form:

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");