
Two-Part Checkins Using com.matrixone.fcs.mcs
The Checkin.start.doIt() method has four variants. Use this variant
when the files are checked into the default store:
public static TicketWrapper doIt(Context?ctx,
String?connectString,
java.util.ArrayList?list) throws MatrixException
Use this variant to specify the checkin store:
public static TicketWrapper doIt(Context?ctx,
String?connectString,
String?store, java.util.ArrayList?list) throws MatrixException
Use this variant to allow the user to override the store
location:
public static TicketWrapper doIt(Context?ctx,
String?connectString,
String?store, String?locationOverride,
java.util.ArrayList?list) throws
MatrixException
The arguments are:
Argument |
Description |
Ctx |
The ENOVIA context |
connectString |
|
Store |
The checkin store |
locationOverride |
The checkin store's location |
List |
The list of proxies given during the last step
is in the exact same order as the related files have been uploaded. If
they are not, the wrong files may be associated to the VPLM metadata,
leading to possible data issues that will be detected later on when trying
to read the data and will be very difficult to fix. |
The system will check for the following errors when listing proxies.
These situations will lead to exceptions that will rollback the transaction.
- The count of proxy list entries with file names does not match the size
of the proxy list.
- There are duplicate file names in the proxy list.
- There are duplicate file names in the receipt.
- The file is mentioned in the receipt, but no corresponding proxy
found.
- The proxy is passed in, but no corresponding entry in the receipt.
To complete the checkin, call the CheckinEnd.doIt() method using one of
these variants:
public static void doIt(Context?ctx, String?receiptValue)
throws java.lang.Exception
public static void doIt(Context?ctx, String?store,
String?receiptValue)
throws MatrixException

Two-part Checkins Using com.matrixone.http.Http
The HttpCheckinStart.doIt() method has the two variants shown below.
Use the second variant when you want to allow the user to override the
checkin location.
public static TicketWrapper doIt(Context?ctx,
String?processingPage,
String?targetPage, String?errorPage, String?store,
String[]?boids,
String[]?fileNames,String[]?formats,String[]?append,String[]?un
lock,
javax.servlet.http.HttpServletRequest?req,
javax.servlet.http.HttpServletResponse?res) throws
MatrixException
public static TicketWrapper doIt(Context?ctx,
String?processingPage,
String?targetPage, String?errorPage, String?store,
String?locationOverride, String[]?boids, String[]?fileNames,
String[]?formats, String[]?append, String[]?unlock,
javax.servlet.http.HttpServletRequest?req,
javax.servlet.http.HttpServletResponse?res) throws
MatrixException
The arguments are described in the following table:
Argument |
Description |
Ctx |
The ENOVIA context |
processingPage |
The page to use for the checkin end. This is
the page where the checkin.end() is called from. This page should perform
any user processing. Users' parameters will be available on this page. |
targetPage |
The final destination page. |
errorPage |
The error page. |
store |
The name of the store. |
locationOverride |
The name of the store for an override operation.
|
Req |
The HTTP servlet request. It must have these
parameters or an exception is thrown: boid, filename, format, append,
and unlock. |
res |
The HTTP servlet response. |
To complete the checkin, call the HttpCheckinEnd.doIt() method which
has this syntax:
public static void doIt(Context?ctx, String?store,
javax.servlet.http.HttpServletRequest?req,
javax.servlet.http.HttpServletResponse?resp)
throws MatrixException
The following example illustrates how to use the HttpCheckinStart.doIt()
method:
String targetPage = "/fcs/thankYou.jsp";
String errorPage = "/fcs/errorPage.jsp";
Context ctx = Framework.getFrameContext(session);
int numFiles = new
Integer(request.getParameter("numFiles")).intValue();
String[] fileNames = request.getParameterValues("fileName");
String[] formats = new String[numFiles];
String[] append = new String[numFiles];
String[] unlock = new String[numFiles];
String[] oids = new String[numFiles];
String[] files = new String[numFiles];
for (int t=0;t<numFiles;t++)
{
formats[t] = format;
oids[t] = oid;
append[t] = appendDefault + "";
unlock[t] = unlockDefault + "";
files[t] = fileNames[t];
}
TicketWrapper ticket = HttpCheckinStart.doIt(ctx,
processingPage,
targetPage, errorPage, store, locationOverride,
oids, files, formats, append, unlock, request, response);
String ticketStr = ticket.getExportString();
String actionURL = ticket.getActionURL();
%>
<html>
<body>
<script>
var fcsForm = parent.frames["fcsForm"].document.forms[0];
fcsForm.<%=McsBase.resolveFcsParam("jobTicket")%>.value='<%=tic
ketStr%>';
fcsForm.action='<%=actionURL%>';
fcsForm.submit();
</script>
</body>
</html>
This example shows how to complete the checkin with the
HttpCheckinEnd.doIt() method.
.
.
.
<%
Context ctx = Framework.getFrameContext(session);
HttpCheckinEnd.doIt(ctx, store, request, response);
%>