|
if (argc < 3) {
printf ("Missing procdef identifier in starter command.\n");
return (1);
}
sprintf (sbuf, "%s%s.xml", PROCESS_DEFINITION_REPOSITORY, argv[2]);
file = fopen (sbuf, "r");
if (!file) {
printf ("Unable to open procdef file %s.\n", sbuf);
return (1);
}
item = xml_read (file);
fclose (file);
if (!item) {
printf ("Corrupt procdef file %s.\n", sbuf);
return (1);
}
sprintf (sbuf, "%s%s_%s.xml", PROCESS_DEFINITION_REPOSITORY, argv[2], xml_attrval (item, "ver"));
file = fopen (sbuf, "r");
if (!file) {
printf ("Unable to open procdef version file %s.\n", sbuf);
return (1);
}
version = xml_read (file);
fclose (file);
if (!version) {
printf ("Corrupt version file %s.\n", sbuf);
return (1);
}
if (strcmp (xml_attrval (version, "name"), "")) {
printf ("%s\n", xml_attrval (version, "name"));
} else {
printf ("%s\n", argv[2]);
}
printf ("%s\n", xml_attrval (item, "ver"));
xml = xml_firstelem (version);
while (xml) {
if (!strcmp (xml->name, "data")) {
See Handling formatting of data items
} else if (!strcmp (xml->name, "sequence")) {
break;
} else if (!strcmp (xml->name, "parallel")) {
break;
} else if (!strcmp (xml->name, "task")) {
break;
}
xml = xml_nextelem (xml);
}
|