

Last date modified: June 17 2025
A re-production job provides you with the ability to select specific documents from a completed production job and re-run them. After a re-production job finishes running, the modified documents are merged into the original production set. These documents overwrite those that were previously produced. For general information, see
The Re-production Job Manager API supports the following functionality:
You can also use the Re-production Job Manager API through REST. For more information, see Re-production Job Manager (REST).
See these related pages:
The Re-production Manager API contains the following methods, classes, and enumerations.
The Re-production Manager API exposes the following methods on the Services.<VersionNumber>.IReproductionJobManager interface:
The Re-production Manager API includes multiple classes. The following list highlights some of the key classes:
If a produced document has three pages, the document has three placeholders after re-production, one for each page of the originally produced document. This process preserves Bates numbering and avoid gaps.
The Re-production Manager AP includes multiple enumerations. The following list highlights some of the key enumerations:
Running - the re-production job is currently running without errors.
A production status of Staged results in a re-production status of Running because it between the New and Produced production states.
For reference content, see Class library reference.
Use the CreateReproductionJobAsync() method to create a new re-production job. This method is overloaded as follows:
1
2
3
4
ReproductionJobResult result = await reproductionJobManager.CreateReproductionJobAsync(int workspaceArtifactID,
ReproductionOptions reproductionOptions,
List<ProductionRef> productions,
List<int> documents);
1
2
3
4
ReproductionJobResult result = await reproductionJobManager.CreateReproductionJobAsync(int workspaceArtifactID,
ReproductionOptions reproductionOptions,
List<ProductionRef> productions,
Guid massOperationToken);
The CreateReproductionJobAsync() method has the following parameters. You can pass a database token or document IDs to this overloaded method.
Review these general guidelines before creating re-production jobs:
The following code sample illustrates how to use the document IDs to create a re-production job.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
public async Task CreateReproductionJob_WithDocumentIds_Example()
{
int workspaceId = 12345; // Workspace Productions exist in
int production1Id = 11111; // Production 1's ArtifactID
int production2Id = 22222; // Production 2's ArtifactID
int production3Id = 33333; // Production 3's ArtifactID
int document1Id = 44444; // Document 1's ArtifactID
int document2Id = 55555; // Document 2's ArtifactID
int document3Id = 66666; // Document 3's ArtifactID
int markupSetId = 77777; // MarkupSet ArtifactID
var userEmail = "user@test.com"; // User's login
var password = "abc123456!"; // User's password
var relativityRestUri = "http://localhost/relativity.rest/api";
var usernamePasswordCredentials = new UsernamePasswordCredentials(userEmail, password);
ServiceFactorySettings settings = new ServiceFactorySettings(new Uri(relativityRestUri), usernamePasswordCredentials);
ServiceFactory serviceFactory = new ServiceFactory(settings);
using (IReproductionJobManager reproductionJobManager = serviceFactory.CreateProxy<IReproductionJobManager>())
{
try
{
List<int> documentIds = new List<int>()
{
document1Id,
document2Id,
document3Id
};
ReproductionOptions reproductionOptions = new ReproductionOptions()
{
ReproductionType = ReproductionType.ReproduceDocument,
ReproduceDocumentOptions = new ReproduceDocumentOptions()
{
BurnRedactions = true,
MarkupSetID = markupSetId,
IncludeNatives = true
}
};
List<ProductionRef> productions = new List<ProductionRef>()
{
new ProductionRef(){ProductionID = production1Id},
new ProductionRef(){ProductionID = production2Id},
new ProductionRef(){ProductionID = production3Id}
};
ReproductionJobResult result = await reproductionJobManager.CreateReproductionJobAsync(workspaceId, reproductionOptions, productions, documentIds);
int reproductionJobId = result.ReproductionJobID;
List<int> productionsCreated = result.ProductionsCreated;
bool wasJobCreated = result.WasJobCreated;
if (!wasJobCreated)
{
Console.WriteLine(result.Errors);
Console.WriteLine(result.Warnings);
Console.WriteLine(result.Messages);
}
// To get a more detailed breakdown of the productions created.
foreach (InnerReproductionJobResult innerResult in result.Results)
{
Console.WriteLine(innerResult.ProductionID);
Console.WriteLine(innerResult.ParentProductionID);
Console.WriteLine(innerResult.Errors);
Console.WriteLine(innerResult.Warnings);
Console.WriteLine(innerResult.Messages);
}
}
catch (ValidationException e)
{
// Log validation exception details
Console.WriteLine("There were validation errors: {0}", e.Message);
}
catch (ServiceException es)
{
// Log service exception details
Console.WriteLine("There were errors: {0}", es.Message);
}
}
}
The following code sample illustrates how to create a re-production job and retrieve related details for it. Before you can create the job, you must generate a database token that is passed to the CreateReproductionJobAsync() method.
Use the following steps to generate a database token for select documents:
In the mass operations bar, click the custom mass operation. A database token is generated that corresponds to a table in the database that holds the selected documents. The database token is at the end of the URL on the page that opens.
Passing a database token eliminates a second server trip to retrieve the requested document IDs of the custom mass operation.
The following code sample illustrates how to use the database token generated in the previous steps to create a re-production job.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
public async Task CreateReproductionJob_WithMassOperationToken_Example()
{
int workspaceId = 12345; // Workspace containing the Production
string databaseToken = "1e51ae24-bbcb-4b61-aafb-1f91859d9891"; // GUID corresponding to the current re-produce mass operation
var userEmail = "user@test.com"; // User login
var password = "abc123456!"; // User password
ReproductionOptions reproductionOptions = new ReproductionOptions() // options for the given reproduction
{
ReproductionType = (ReproductionType)2, // Reproduction type (reproduce document = 0, replace document With placeholder = 1, replace placeholder with document = 2)
ReproduceDocumentOptions = null, // left null because this isn't the reproduction type selected
ReplaceDocumentWithPlaceholderOptions = null, // left null because this isn't the reproduction type selected
ReplacePlaceholderWithDocumentOptions = new ReplacePlaceholderWithDocumentOptions() // options for replacing the placeholder with a document
{
Delimiter = "_", // character after bates number ([Bates#]_0001)
NumberOfDigits = 4, // number of digits after bates number ([Bates#]_0001)
IncludeNatives = true, // option to include natives
BurnRedactions = true, // option to burn redactions
MarkupSetID = 6789 // ID of markup set for redactions, if chosen
}
};
IEnumerable<ProductionRef> productions = new List<ProductionRef>() // productions to be reproduced
{
new ProductionRef()
{
ProductionID = 1 // production ID to be reproduced
},
new ProductionRef()
{
ProductionID = 2 // production ID to be reproduced
}
};
var relativityRestUri = "http://localhost/relativity.rest/api";
var usernamePasswordCredentials = new UsernamePasswordCredentials(userEmail, password);
ServiceFactorySettings settings = new ServiceFactorySettings(new Uri(relativityRestUri), usernamePasswordCredentials);
ServiceFactory serviceFactory = new ServiceFactory(settings);
using (IReproductionJobManager reproductionJobManager = serviceFactory.CreateProxy<IReproductionJobManager>())
{
try
{
ReproductionJobResult reproductionJobResult = await reproductionJobManager.CreateReproductionJobAsync(workspaceId, reproductionOptions, productions, databaseToken);
// Do something, like display information about the created reproduction job.
if (reproductionJobResult.WasJobCreated == true)
{
Console.WriteLine("A reproduction job with the ID {0} was created.", reproductionJobResult.ReproductionJobID);
Console.WriteLine("The following productions were created: {0}.", string.Join(", ", reproductionJobResult.ProductionsCreated.ToList()));
}
else
{
Console.WriteLine("Failed to create reproduction job.");
}
}
catch (ValidationException e)
{
// Log validation exception details
Console.WriteLine("There were validation errors: {0}", e.Message);
}
catch (ServiceException es)
{
// Log service exception details
Console.WriteLine("There were errors: {0}", es.Message);
}
}
}
Use the GetReproductionJobIDsAsync() method to retrieve the IDs for re-production jobs run in a specified workspace. Pass the Artifact ID of the workspace to this method.
You must have view permissions for productions to retrieve re-production job IDs.
This method returns a list of integers representing re-production job IDs.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
public partial class Example
{
public async Task GetReproductionJobIDs_Example()
{
int workspaceId = 12345; // Workspace Re-productions exist in
var userEmail = "user@test.com"; // User's login
var password = "abc123456!"; // User's password
var relativityRestUri = "http://localhost/relativity.rest/api";
var usernamePasswordCredentials = new UsernamePasswordCredentials(userEmail, password);
ServiceFactorySettings settings = new ServiceFactorySettings(new Uri(relativityRestUri), usernamePasswordCredentials);
ServiceFactory serviceFactory = new ServiceFactory(settings);
using (IReproductionJobManager reproductionJobManager = serviceFactory.CreateProxy<IReproductionJobManager>())
{
try
{
List<int> reproductionJobIds = await reproductionJobManager.GetReproductionJobIDsAsync(workspaceId);
}
catch (ValidationException e)
{
// Log validation exception details
Console.WriteLine("There were validation errors: {0}", e.Message);
}
catch (ServiceException es)
{
// Log service exception details
Console.WriteLine("There were errors: {0}", es.Message);
}
}
}
}
Use the GetReproductionStatusByReproductionJobIDAsync() method to retrieve the status of a re-production job. For example, you might call this method to determine whether a job has completed after creating and running it.
Pass the following arguments to this method:
This method returns ReproductionStatusResult object, which includes errors, warnings, and messages. It also includes a ProductionStatus object with properties for Artifact ID and status of each production included in the re-production job. For re-production statuses, see Fundamentals for the Re-production Manager API
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
public partial class Example
{
public async Task GetReproductionStatusByReproductionJobID_Example()
{
int workspaceId = 12345; // Workspace Re-productions exist in
int reproductionJobId = 123; // Re-production JobID
var userEmail = "user@test.com"; // User's login
var password = "abc123456!"; // User's password
var relativityRestUri = "http://localhost/relativity.rest/api";
var usernamePasswordCredentials = new UsernamePasswordCredentials(userEmail, password);
ServiceFactorySettings settings = new ServiceFactorySettings(new Uri(relativityRestUri), usernamePasswordCredentials);
ServiceFactory serviceFactory = new ServiceFactory(settings);
using (IReproductionJobManager reproductionJobManager = serviceFactory.CreateProxy<IReproductionJobManager>())
{
try
{
ReproductionStatusResult reproductionStatusResult = await reproductionJobManager.GetReproductionStatusByReproductionJobIDAsync(workspaceId, reproductionJobId);
Console.WriteLine(reproductionStatusResult.ReproductionStatus);
Console.WriteLine(reproductionStatusResult.Errors);
Console.WriteLine(reproductionStatusResult.Warnings);
Console.WriteLine(reproductionStatusResult.Messages);
foreach (ProductionStatusResult result in reproductionStatusResult.ProductionStatusResults)
{
Console.WriteLine(result.ArtifactID); //Production ArtifactID
Console.WriteLine(result.Status); //Production Status
}
}
catch (ValidationException e)
{
// Log validation exception details
Console.WriteLine("There were validation errors: {0}", e.Message);
}
catch (ServiceException es)
{
// Log service exception details
Console.WriteLine("There were errors: {0}", es.Message);
}
}
}
}
Why was this not helpful?
Check one that applies.
Thank you for your feedback.
Want to tell us more?
Great!
Additional Resources |
|||
DevHelp Community | GitHub | Release Notes | NuGet |